From 8b8176e7920784c905443caf3e6785c437ffbb76 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sat, 23 May 2020 19:35:47 +0200 Subject: [PATCH] give user control of option skip_sanity_check --- mesonbuild/interpreter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index b8d4fec75749..1598c7ccbb86 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3169,13 +3169,13 @@ def add_languages(self, args: T.Sequence[str], required: bool, for_machine: Mach return success def should_skip_sanity_check(self, for_machine: MachineChoice) -> bool: - if for_machine != MachineChoice.HOST: - return False - if not self.environment.is_cross_build(): - return False should = self.environment.properties.host.get('skip_sanity_check', False) if not isinstance(should, bool): raise InterpreterException('Option skip_sanity_check must be a boolean.') + if for_machine != MachineChoice.HOST and not should: + return False + if not self.environment.is_cross_build() and not should: + return False return should def add_languages_for(self, args, required, for_machine: MachineChoice):