blob: 772395e8791241d0681468817fb1f8bb6682c91c [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001meson.build files that use cc.run() in native builds can silently fallback to
2meson.get_cross_property() in cross builds without an exe-wrapper, but there's
3no way to know that this is happening.
4
5As the defaults may be pessimistic (for example, disabling the support for a
6feature that should be enabled) emit a warning when the default is used, so that
7the recipe can explicitly set the cross property as relevant.
8
9Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071]
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
13index 3c3cfae0..10e741ae 100644
14--- a/mesonbuild/interpreter.py
15+++ b/mesonbuild/interpreter.py
16@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject):
17 return props[propname]
18 except Exception:
19 if len(args) == 2:
20+ mlog.warning('Cross property %s is using default value %s' % (propname, args[1]))
21 return args[1]
22 raise InterpreterException('Unknown cross property: %s.' % propname)
23