meson: enable process reporting for do_compile
PATCH 1/2 meson: enable process reporting for do_compile
Ninja outputs progress information during a build (for example [12/34]) so we can tell bitbake how to parse this.
--- meta-oe/classes/meson.bbclass | 1 + 1 file changed, 1 insertion(+)
meta-oe/classes/meson.bbclass +1 -0
@@ -75,6 +75,7 @@ meson_do_configure() { fi } +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]" meson_do_compile() { ninja ${PARALLEL_MAKE} }
Signature · 1 line
2.8.1
PATCH 2/2 meson: set native tools
When cross-compiling meson respects the usual CC, CFLAGS and so on environment variables for *native* tools not *cross* tools, so instead of unexporting CC we should re-export the right tools.
Not only is this the right thing to do, but recent changes to oe-core means that the default compiler binary (cc) isn't in PATH, so Meson can't build native binaries.
--- meta-oe/classes/meson.bbclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
meta-oe/classes/meson.bbclass +7 -3
@@ -9,9 +9,13 @@ do_configure[cleandirs] = "${B}" # Where the meson.build build configuration is MESON_SOURCEPATH = "${S}" -# These variables in the environment override the *native* tools not the cross, -# so they need to be unexported. -CC[unexport] = "1" +# These variables in the environment override the *native* tools not the cross +CPPFLAGS = "${BUILD_CPPFLAGS}" +CC = "${BUILD_CC}" +CFLAGS = "${BUILD_CFLAGS}" +CXX = "${BUILD_CXX}" +CXXFLAGS = "${BUILD_CXXFLAGS}" +LDFLAGS = "${BUILD_LDFLAGS}" def noprefix(var, d): return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
Signature · 1 line
2.8.1
Just realised that my local master was out of date and these don't apply anymore, I'll rebase and resend.
Ross
Quoted 25 lines · Ross Burton
Ninja outputs progress information during a build (for example [12/34]) so we
can tell bitbake how to parse this.Signed-off-by Ross Burton <[email protected]>--- meta-oe/classes/meson.bbclass | 1 + 1 file changed, 1 insertion(+)meta-oe/classes/meson.bbclass +1
-1@@ -75,6 +75,7 @@ meson_do_configure() { fi } +do_compile[progress] = "outof:^\[(\d+)/(\d+)\]" meson_do_compile() { ninja ${PARALLEL_MAKE} } --2.8.1