Fix finding the static linker for native compiler in cross build

Native ar and cross ar are not the same!
pull/4765/head
John Ericson 6 years ago committed by Jussi Pakkanen
parent b204a74917
commit 8165fa6ad0
  1. 3
      mesonbuild/environment.py

@ -1023,7 +1023,8 @@ class Environment:
return comp, cross_comp return comp, cross_comp
def detect_static_linker(self, compiler): 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: if linker is not None:
linkers = [linker] linkers = [linker]
else: else:

Loading…
Cancel
Save