aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorJustin Blanchard <UncombedCoconut@gmail.com>2022-07-19 22:31:21 -0400
committerDylan Baker <dylan@pnwbakers.com>2022-07-21 22:00:00 -0700
commitec388fe7c2b93879499ad782c2da41ec22d003b2 (patch)
treec37c73c03f009f77ea1838327df719f6a5b2763e /mesonbuild/compilers
parent0eed99318b88fbb0c938345e19dc7259cb2ae4b2 (diff)
downloadmeson-ec388fe7c2b93879499ad782c2da41ec22d003b2.zip
meson-ec388fe7c2b93879499ad782c2da41ec22d003b2.tar.gz
meson-ec388fe7c2b93879499ad782c2da41ec22d003b2.tar.bz2
ar linker: detect the "osx ld" case (where generating thin archives won't work) based on host OS, not build OS.
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/detect.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py
index 6bc083d..5306e87 100644
--- a/mesonbuild/compilers/detect.py
+++ b/mesonbuild/compilers/detect.py
@@ -341,13 +341,13 @@ def detect_static_linker(env: 'Environment', compiler: Compiler) -> StaticLinker
if out.startswith('The CompCert'):
return CompCertLinker(linker)
if p.returncode == 0:
- return ArLinker(linker)
+ return ArLinker(compiler.for_machine, linker)
if p.returncode == 1 and err.startswith('usage'): # OSX
- return ArLinker(linker)
+ return ArLinker(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
- return ArLinker(linker)
+ return ArLinker(compiler.for_machine, linker)
_handle_exceptions(popen_exceptions, linkers, 'linker')