summaryrefslogtreecommitdiffstats
path: root/meta/classes/meson.bbclass
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2018-06-01 14:02:34 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-04 15:15:00 +0100
commit34bb96016081d03c2661d7e8bbca884383cc5bf5 (patch)
treea987e7c948941ab186635a3c8ead9f9fab981745 /meta/classes/meson.bbclass
parent9481289419876dbb61c5b8844859add2795f5e54 (diff)
downloadpoky-34bb96016081d03c2661d7e8bbca884383cc5bf5.tar.gz
meson.bbclass: refactor native override
The native override is specified in two different places, so let's move it into a function to reduce code duplication. (From OE-Core rev: c455ec4a12d4966524da9436722476aa2d428765) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/meson.bbclass')
-rw-r--r--meta/classes/meson.bbclass17
1 files changed, 7 insertions, 10 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 2d7ee4fffc..5881765abb 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -90,7 +90,7 @@ meson_do_configure() {
90 fi 90 fi
91} 91}
92 92
93meson_do_configure_prepend_class-target() { 93override_native_tools() {
94 # Set these so that meson uses the native tools for its build sanity tests, 94 # Set these so that meson uses the native tools for its build sanity tests,
95 # which require executables to be runnable. The cross file will still 95 # which require executables to be runnable. The cross file will still
96 # override these for the target build. Note that we do *not* set CFLAGS, 96 # override these for the target build. Note that we do *not* set CFLAGS,
@@ -100,18 +100,15 @@ meson_do_configure_prepend_class-target() {
100 export CXX="${BUILD_CXX}" 100 export CXX="${BUILD_CXX}"
101 export LD="${BUILD_LD}" 101 export LD="${BUILD_LD}"
102 export AR="${BUILD_AR}" 102 export AR="${BUILD_AR}"
103
104}
105
106meson_do_configure_prepend_class-target() {
107 override_native_tools
103} 108}
104 109
105meson_do_configure_prepend_class-nativesdk() { 110meson_do_configure_prepend_class-nativesdk() {
106 # Set these so that meson uses the native tools for its build sanity tests, 111 override_native_tools
107 # which require executables to be runnable. The cross file will still
108 # override these for the nativesdk build. Note that we do *not* set CFLAGS,
109 # LDFLAGS, etc. as they will be slurped in by meson and applied to the
110 # nativesdk build, causing errors.
111 export CC="${BUILD_CC}"
112 export CXX="${BUILD_CXX}"
113 export LD="${BUILD_LD}"
114 export AR="${BUILD_AR}"
115} 112}
116 113
117meson_do_configure_prepend_class-native() { 114meson_do_configure_prepend_class-native() {