diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index 584d7366d448..c09d7e312ab7 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -991,6 +991,8 @@ def need_exe_wrapper(self, for_machine: MachineChoice = MachineChoice.HOST): value = self.properties[for_machine].get('needs_exe_wrapper', None) if value is not None: return value + if not self.is_cross_build(): + return False return not machine_info_can_run(self.machines[for_machine]) def get_exe_wrapper(self) -> T.Optional[ExternalProgram]: