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.
pull/4181/merge
David Seifert 6 years ago committed by Jussi Pakkanen
parent 69ec001b06
commit 0e89b03be6
  1. 3
      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)

Loading…
Cancel
Save