Skip to content

Commit

Permalink
give user control of option skip_sanity_check
Browse files Browse the repository at this point in the history
  • Loading branch information
Neumann-A authored and jpakkane committed Jul 4, 2020
1 parent f8bec97 commit 92075f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mesonbuild/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3196,13 +3196,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):
Expand Down

0 comments on commit 92075f5

Please sign in to comment.