Cross build is defined by the existance of a cross file.

pull/6001/head
Jussi Pakkanen 5 years ago
parent 51fef880b6
commit 0b4d1e8afd
  1. 2
      mesonbuild/coredata.py
  2. 2
      mesonbuild/environment.py

@ -636,7 +636,7 @@ class CoreData:
if type(oldval) != type(value): if type(oldval) != type(value):
self.user_options[name] = value self.user_options[name] = value
def is_cross_build(self): def is_cross_build(self) -> bool:
return len(self.cross_files) > 0 return len(self.cross_files) > 0
def strip_build_option_names(self, options): def strip_build_option_names(self, options):

@ -611,7 +611,7 @@ class Environment:
self.first_invocation = True self.first_invocation = True
def is_cross_build(self) -> bool: def is_cross_build(self) -> bool:
return not self.machines.matches_build_machine(MachineChoice.HOST) return self.coredata.is_cross_build()
def dump_coredata(self): def dump_coredata(self):
return coredata.save(self.coredata, self.get_build_dir()) return coredata.save(self.coredata, self.get_build_dir())

Loading…
Cancel
Save