aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mconf.py
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2018-12-12 00:19:03 -0500
committerJohn Ericson <git@JohnEricson.me>2019-02-02 13:59:14 -0500
commit19f81d3e33c70c9c902dabaad732e5d33bf05bd4 (patch)
treef86664395d7233bbba9e3c129c81c7056c6fa98b /mesonbuild/mconf.py
parent6dbe33d949237411b1291c30f5383885befb3554 (diff)
downloadmeson-19f81d3e33c70c9c902dabaad732e5d33bf05bd4.zip
meson-19f81d3e33c70c9c902dabaad732e5d33bf05bd4.tar.gz
meson-19f81d3e33c70c9c902dabaad732e5d33bf05bd4.tar.bz2
Never access environment.properties downstream
Instead use coredata.compiler_options.<machine>. This brings the cross and native code paths closer together, since both now use that. Command line options are interpreted just as before, for backwards compatibility. This does introduce some funny conditionals. In the future, I'd like to change the interpretation of command line options so - The logic is cross-agnostic, i.e. there are no conditions affected by `is_cross_build()`. - Compiler args for both the build and host machines can always be controlled by the command line. - Compiler args for both machines can always be controlled separately.
Diffstat (limited to 'mesonbuild/mconf.py')
-rw-r--r--mesonbuild/mconf.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
index b8fb3c6..48f88e8 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -139,7 +139,8 @@ class Conf:
self.print_options('Core options', core_options)
self.print_options('Backend options', self.coredata.backend_options)
self.print_options('Base options', self.coredata.base_options)
- self.print_options('Compiler options', self.coredata.compiler_options)
+ # TODO others
+ self.print_options('Compiler options', self.coredata.compiler_options.build)
self.print_options('Directories', dir_options)
self.print_options('Project options', self.coredata.user_options)
self.print_options('Testing options', test_options)
@@ -154,6 +155,9 @@ def run(options):
save = False
if len(options.cmd_line_options) > 0:
c.set_options(options.cmd_line_options)
+ if not c.build.environment.is_cross_build():
+ # TODO think about cross and command-line interface.
+ c.coredata.compiler_options.host = c.coredata.compiler_options.build
coredata.update_cmd_line_file(builddir, options)
save = True
elif options.clearcache: