aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-06-10 08:22:46 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-06-11 07:10:43 +0000
commit47c477711b61f7b60551129f039fba67f7d3483e (patch)
tree3e18f8ae3a075fe0b7582efcfca3b2d0d2bc0445 /mesonbuild/linkers.py
parent5b8a63650478a96799e2c8929f66849d1e68a38a (diff)
downloadmeson-47c477711b61f7b60551129f039fba67f7d3483e.zip
meson-47c477711b61f7b60551129f039fba67f7d3483e.tar.gz
meson-47c477711b61f7b60551129f039fba67f7d3483e.tar.bz2
apple: -headerpad args are ignored when bitcode is enabled
Causes spammy warnings from the linker: ld: warning: -headerpad_max_install_names is ignored when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)
Diffstat (limited to 'mesonbuild/linkers.py')
-rw-r--r--mesonbuild/linkers.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index 25a8c9c..bb3229d 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -440,6 +440,10 @@ class DynamicLinker(LinkerEnvVarsMixin, metaclass=abc.ABCMeta):
"""Arguments to make all warnings errors."""
return []
+ def headerpad_args(self) -> T.List[str]:
+ # Only used by the Apple linker
+ return []
+
def bitcode_args(self) -> T.List[str]:
raise mesonlib.MesonException('This linker does not support bitcode bundles')
@@ -659,8 +663,8 @@ class AppleDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker):
def no_undefined_args(self) -> T.List[str]:
return self._apply_prefix('-undefined,error')
- def get_always_args(self) -> T.List[str]:
- return self._apply_prefix('-headerpad_max_install_names') + super().get_always_args()
+ def headerpad_args(self) -> T.List[str]:
+ return self._apply_prefix('-headerpad_max_install_names')
def bitcode_args(self) -> T.List[str]:
return self._apply_prefix('-bitcode_bundle')
@@ -688,9 +692,7 @@ class AppleDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker):
install_rpath: str) -> T.Tuple[T.List[str], T.Set[bytes]]:
if not rpath_paths and not install_rpath and not build_rpath:
return ([], set())
- # Ensure that there is enough space for install_name_tool in-place
- # editing of large RPATHs
- args = self._apply_prefix('-headerpad_max_install_names')
+ args = []
# @loader_path is the equivalent of $ORIGIN on macOS
# https://stackoverflow.com/q/26280738
origin_placeholder = '@loader_path'