aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-01-21 21:14:14 +0000
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-09-10 07:20:41 +0000
commitfc0f0df74b5bf7327b566531b58b23620cba195a (patch)
treead302c96e98e56d1a8ce24a4645f6478ccd5515b /mesonbuild/interpreter.py
parent4cef45af21465f4c860dbd467796b1c768f556f4 (diff)
downloadmeson-fc0f0df74b5bf7327b566531b58b23620cba195a.zip
meson-fc0f0df74b5bf7327b566531b58b23620cba195a.tar.gz
meson-fc0f0df74b5bf7327b566531b58b23620cba195a.tar.bz2
Don't require build machine compilers for project() languages
This means that, in the common case of a simple meson.build which doesn't contain any 'native: true' targets, we won't require a native compiler when cross-compiling, without needing any changes in the meson.build.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 031bed0..5771c65 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -3135,8 +3135,10 @@ external dependencies (including libraries) must go to "dependencies".''')
self.build.projects[self.subproject] = proj_name
mlog.log('Project name:', mlog.bold(proj_name))
mlog.log('Project version:', mlog.bold(self.project_version))
- self.add_languages(proj_langs, True, MachineChoice.BUILD)
+
self.add_languages(proj_langs, True, MachineChoice.HOST)
+ self.add_languages(proj_langs, False, MachineChoice.BUILD)
+
self.set_backend()
if not self.is_subproject():
self.check_stdlibs()