From d6b9d431ec071f54796c5ed3173efa5ad1b86db3 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 25 Jul 2022 09:56:52 -0700 Subject: linkers: Add a representation for the Apple AR Linker Which is old and annoying and doesn't expose global symbols by default, so we need a work around. see: https://github.com/mesonbuild/meson/pull/10587 see: https://lists.gnu.org/archive/html/libtool/2002-07/msg00025.html --- mesonbuild/compilers/detect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild/compilers') diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py index 5306e87..063439f 100644 --- a/mesonbuild/compilers/detect.py +++ b/mesonbuild/compilers/detect.py @@ -24,6 +24,7 @@ from ..linkers import ( guess_win_linker, guess_nix_linker, AIXArLinker, + AppleArLinker, ArLinker, ArmarLinker, ArmClangDynamicLinker, @@ -343,7 +344,7 @@ def detect_static_linker(env: 'Environment', compiler: Compiler) -> StaticLinker if p.returncode == 0: return ArLinker(compiler.for_machine, linker) if p.returncode == 1 and err.startswith('usage'): # OSX - return ArLinker(compiler.for_machine, linker) + return AppleArLinker(compiler.for_machine, linker) if p.returncode == 1 and err.startswith('Usage'): # AIX return AIXArLinker(linker) if p.returncode == 1 and err.startswith('ar: bad option: --'): # Solaris -- cgit v1.1