aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-06-02 19:27:49 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-06-06 07:53:10 +0000
commit56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8 (patch)
treea9f12727cf76e2ad5d0c04f6491ef085440c7804 /mesonbuild/interpreter.py
parent0565262be35423b60a69b5df32c4ca485e976b12 (diff)
downloadmeson-56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8.zip
meson-56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8.tar.gz
meson-56a7d8b2b3f0239ef9bd4507c6e28acb4059c5c8.tar.bz2
Warn when Apple bitcode support is enabled and in-use
We have to disable some options, so tell the user about them and point to the documentation so they can read more about it.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 26405e2..cd608db 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2494,7 +2494,13 @@ to directly access options of other subprojects.''')
self.add_base_options(comp)
return success
+ def emit_base_options_warnings(self, enabled_opts):
+ if 'b_bitcode' in enabled_opts:
+ mlog.warning('Base option \'b_bitcode\' is enabled, which is incompatible with many linker options. Incompatible options such as such as \'b_asneeded\' have been disabled.')
+ mlog.warning('Please see https://mesonbuild.com/Builtin-options.html#Notes_about_Apple_Bitcode_support for more details.')
+
def add_base_options(self, compiler):
+ enabled_opts = []
proj_opt = self.environment.cmd_line_options.projectoptions
for optname in compiler.base_options:
if optname in self.coredata.base_options:
@@ -2502,9 +2508,13 @@ to directly access options of other subprojects.''')
oobj = compilers.base_options[optname]
for po in proj_opt:
if po.startswith(optname + '='):
- oobj.set_value(po.split('=', 1)[1])
+ opt, value = po.split('=', 1)
+ oobj.set_value(value)
+ if oobj.value:
+ enabled_opts.append(opt)
break
self.coredata.base_options[optname] = oobj
+ self.emit_base_options_warnings(enabled_opts)
def program_from_cross_file(self, prognames, silent=False):
bins = self.environment.cross_info.config['binaries']