aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2018-10-14 00:53:16 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-14 23:56:59 +0300
commita28eddb822ab45f64859491cf2108d6ceb120d47 (patch)
tree9b4beb49337ce5be8d501bd1da0fab8ab6d987cd /mesonbuild/compilers/c.py
parent3a8911a07fd120b6d06b00e0743cab8c2d980923 (diff)
downloadmeson-a28eddb822ab45f64859491cf2108d6ceb120d47.zip
meson-a28eddb822ab45f64859491cf2108d6ceb120d47.tar.gz
meson-a28eddb822ab45f64859491cf2108d6ceb120d47.tar.bz2
Use relative build-tree RPATHs on macOS
* This helps with reproducibility on macOS in the same way `$ORIGIN` improves reproducibility on Linux-like systems. * This makes the build-tree more resilient to users injecting rpaths via `LDFLAGS`. Currently Meson on macOS crashes when a build-tree rpath and a user-provided `-Wl,-rpath` in LDFLAGS collide, leading to `install_name_tool` failures. While this still does not solve the root cause, it makes the occurrence much less likely, as users will generally pass absolute `-Wl,-rpath` arguments into Meson.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 8b46804..c51a6ab 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -121,10 +121,7 @@ class CCompiler(Compiler):
# The default behavior is this, override in MSVC
@functools.lru_cache(maxsize=None)
def build_rpath_args(self, build_dir, from_dir, rpath_paths, build_rpath, install_rpath):
- if getattr(self, 'compiler_type', False) and self.compiler_type.is_osx_compiler:
- # Clang, GCC and ICC on macOS all use the same rpath arguments
- return self.build_osx_rpath_args(build_dir, rpath_paths, build_rpath)
- elif self.compiler_type.is_windows_compiler:
+ if self.compiler_type.is_windows_compiler:
return []
return self.build_unix_rpath_args(build_dir, from_dir, rpath_paths, build_rpath, install_rpath)