]> code.ossystems Code Review - openembedded-core.git/commit
icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time
authorDouglas Royds <douglas.royds@taitradio.com>
Wed, 19 Dec 2018 22:59:47 +0000 (11:59 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Dec 2018 13:40:17 +0000 (13:40 +0000)
commitd2fcaeb153fdc3f8d7143ea823139f1537055ff1
treea7a3a138b62da10628970dcb7f91d8bcac444927
parent4455c46bf7f49c2b44f250aa89b63b342368e2e3
icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time

The python function icecc_path() was being invoked inline by set_icecc_env(),
meaning that it was being invoked at recipe-parsing time.
As a side-effect, icecc_path() was creating the recipe-sysroot directory and
symlinking icecc into it. Because this was done at parsing time (rather than
configure time), we were generating otherwise-empty WORKDIRs for *all* parsed
recipes, and for all virtual classes (-native, -nativesdk).
In my build, this generated more than 800 of these otherwise-empty WORKDIRs.

I have simplified icecc_path() to return only the intended path to the icecc
symlinks in the recipe-sysroot, with no side-effect.
We then create the directory and the icecc symlinks at configure time.

Because get_cross_kernel_cc() is still invoked at parse-time,
it needs a guard-clause for the non-kernel case.
We are now finding the host icecc at do_configure time,
so icecc needs to be in the HOSTTOOLS. I have made this non-fatal,
so that we can still inherit icecc without icecc installed.

Signed-off-by: Douglas Royds <douglas.royds@taitradio.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/icecc.bbclass