diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-02-08 18:33:49 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2020-02-12 13:33:00 +0000 |
commit | c5a32c2afe843798d714fc9087bf55ad996b4052 (patch) | |
tree | 646008b174c405b5d419a6a87c13b9e63b62a402 /mesonbuild/interpreter.py | |
parent | 7a159ff1e1e947f20a017bbc8e89c1701a9d7098 (diff) | |
download | meson-c5a32c2afe843798d714fc9087bf55ad996b4052.zip meson-c5a32c2afe843798d714fc9087bf55ad996b4052.tar.gz meson-c5a32c2afe843798d714fc9087bf55ad996b4052.tar.bz2 |
Refine behaviour of add_languages() when native: is missing
This improves the common case of a simple meson.build which doesn't
contain any 'native: true' targets to not require a native compiler when
cross-compiling, without needing any changes in the meson.build.
v2:
Do it the right way around!
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 0d83472..d799696 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2927,9 +2927,9 @@ external dependencies (including libraries) must go to "dependencies".''') return self.add_languages(args, required, self.machine_from_native_kwarg(kwargs)) else: # absent 'native' means 'both' for backwards compatibility - mlog.warning('add_languages is missing native:, assuming languages are required for both host and build.', + mlog.warning('add_languages is missing native:, assuming languages are wanted for both host and build.', location=self.current_node) - success = self.add_languages(args, required, MachineChoice.BUILD) + success = self.add_languages(args, False, MachineChoice.BUILD) success &= self.add_languages(args, required, MachineChoice.HOST) return success |