aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-01-09 15:54:07 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-10 23:04:41 +0200
commit8165fa6ad0ffee11d0342b724331ace0a6f49773 (patch)
tree6d791d20bd56a00eb7f6910bf963b5c65b4054e3
parentb204a749176a964f4c44437eb9d6ef58fa18880b (diff)
downloadmeson-8165fa6ad0ffee11d0342b724331ace0a6f49773.zip
meson-8165fa6ad0ffee11d0342b724331ace0a6f49773.tar.gz
meson-8165fa6ad0ffee11d0342b724331ace0a6f49773.tar.bz2
Fix finding the static linker for native compiler in cross build
Native ar and cross ar are not the same!
-rw-r--r--mesonbuild/environment.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index f287cb0..4bf77ac 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -1023,7 +1023,8 @@ class Environment:
return comp, cross_comp
def detect_static_linker(self, compiler):
- linker = self.binaries.host.lookup_entry('ar')
+ for_machine = MachineChoice.HOST if compiler.is_cross else MachineChoice.BUILD
+ linker = self.binaries[for_machine].lookup_entry('ar')
if linker is not None:
linkers = [linker]
else: