aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/c.py
diff options
context:
space:
mode:
authorDavid Seifert <soap@gentoo.org>2018-09-15 13:13:53 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-09-16 00:47:32 +0300
commit0e89b03be63c8b0a4ffb530cc20dc29aa01844db (patch)
tree1c266d042861ea69a1239c8c82775bd47a8837e1 /mesonbuild/compilers/c.py
parent69ec001b0672094ab92c07f5e561c9c0525aef7b (diff)
downloadmeson-0e89b03be63c8b0a4ffb530cc20dc29aa01844db.zip
meson-0e89b03be63c8b0a4ffb530cc20dc29aa01844db.tar.gz
meson-0e89b03be63c8b0a4ffb530cc20dc29aa01844db.tar.bz2
Do not use relative RPATHs on macOS with ICC/GCC
* Currently, absolute rpaths on macOS are only used with Clang, which breaks Meson builds when using ICC or GCC from Homebrew or MacPorts.
Diffstat (limited to 'mesonbuild/compilers/c.py')
-rw-r--r--mesonbuild/compilers/c.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index acd3b3d..9b7ac68 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -121,7 +121,8 @@ 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 self.id == 'clang' and self.compiler_type == CompilerType.CLANG_OSX:
+ 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)
return self.build_unix_rpath_args(build_dir, from_dir, rpath_paths, build_rpath, install_rpath)