diff options
-rw-r--r-- | meta/recipes-devtools/meson/meson.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/cross-prop-default.patch | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index d5d71c67b6..ca448b00a0 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc | |||
@@ -14,6 +14,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P | |||
14 | file://cross-libdir.patch \ | 14 | file://cross-libdir.patch \ |
15 | file://0001-modules-windows-split-WINDRES-env-variable.patch \ | 15 | file://0001-modules-windows-split-WINDRES-env-variable.patch \ |
16 | file://0002-environment.py-detect-windows-also-if-the-system-str.patch \ | 16 | file://0002-environment.py-detect-windows-also-if-the-system-str.patch \ |
17 | file://cross-prop-default.patch \ | ||
17 | " | 18 | " |
18 | SRC_URI[sha256sum] = "ef9f14326ec1e30d3ba1a26df0f92826ede5a79255ad723af78a2691c37109fd" | 19 | SRC_URI[sha256sum] = "ef9f14326ec1e30d3ba1a26df0f92826ede5a79255ad723af78a2691c37109fd" |
19 | SRC_URI[md5sum] = "0267b0871266056184c484792572c682" | 20 | SRC_URI[md5sum] = "0267b0871266056184c484792572c682" |
diff --git a/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/meta/recipes-devtools/meson/meson/cross-prop-default.patch new file mode 100644 index 0000000000..772395e879 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/cross-prop-default.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | meson.build files that use cc.run() in native builds can silently fallback to | ||
2 | meson.get_cross_property() in cross builds without an exe-wrapper, but there's | ||
3 | no way to know that this is happening. | ||
4 | |||
5 | As the defaults may be pessimistic (for example, disabling the support for a | ||
6 | feature that should be enabled) emit a warning when the default is used, so that | ||
7 | the recipe can explicitly set the cross property as relevant. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071] | ||
10 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
11 | |||
12 | diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py | ||
13 | index 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 | |||