aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorAlexander Neumann <Alexander.Neumann@hamburg.de>2020-05-23 19:35:47 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-07-04 13:31:25 +0300
commit92075f5ef3c5df3b5e6ec4ae5189e58acb2e7c3f (patch)
tree2fc92350baa28eea671d09ddf844a45f9ba1ed29 /mesonbuild/interpreter.py
parentf8bec97084756f1f21e470fffa6c1b5546a43681 (diff)
downloadmeson-92075f5ef3c5df3b5e6ec4ae5189e58acb2e7c3f.zip
meson-92075f5ef3c5df3b5e6ec4ae5189e58acb2e7c3f.tar.gz
meson-92075f5ef3c5df3b5e6ec4ae5189e58acb2e7c3f.tar.bz2
give user control of option skip_sanity_check
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 12d6cde..aad77b0 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -3196,13 +3196,13 @@ external dependencies (including libraries) must go to "dependencies".''')
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):