aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/detect.py')
-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')