diff options
author | Martin Kelly <mkelly@xevo.com> | 2018-06-01 14:02:34 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-03 23:47:49 +0100 |
commit | c455ec4a12d4966524da9436722476aa2d428765 (patch) | |
tree | f724c105ebe8e48264533517070d09def1a2f4d4 | |
parent | c40b241e8d40c8bc1c9e6065b12e260662f5bba4 (diff) | |
download | openembedded-core-c455ec4a12d4966524da9436722476aa2d428765.tar.gz openembedded-core-c455ec4a12d4966524da9436722476aa2d428765.tar.bz2 openembedded-core-c455ec4a12d4966524da9436722476aa2d428765.zip |
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.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/meson.bbclass | 17 |
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() { fi } -meson_do_configure_prepend_class-target() { +override_native_tools() { # Set these so that meson uses the native tools for its build sanity tests, # which require executables to be runnable. The cross file will still # override these for the target build. Note that we do *not* set CFLAGS, @@ -100,18 +100,15 @@ meson_do_configure_prepend_class-target() { export CXX="${BUILD_CXX}" export LD="${BUILD_LD}" export AR="${BUILD_AR}" + +} + +meson_do_configure_prepend_class-target() { + override_native_tools } meson_do_configure_prepend_class-nativesdk() { - # Set these so that meson uses the native tools for its build sanity tests, - # which require executables to be runnable. The cross file will still - # override these for the nativesdk build. Note that we do *not* set CFLAGS, - # LDFLAGS, etc. as they will be slurped in by meson and applied to the - # nativesdk build, causing errors. - export CC="${BUILD_CC}" - export CXX="${BUILD_CXX}" - export LD="${BUILD_LD}" - export AR="${BUILD_AR}" + override_native_tools } meson_do_configure_prepend_class-native() { |