Hi Poky Community,

This is a separate issue as another issue uncovered from discussion item originally prompted by submission #13328 (Compiling Poky with Clang and Clang Coverage Flags).

The issue is, when poky builds are intended to be compiled using the clang/ LLVM toolchain with full code coverage via setting the following in local.conf (and including the meta-clang layer):

TOOLCHAIN = "clang"

TARGET_CPPFLAGS:prepend:class-target:toolchain-clang = "-fprofile-instr-generate -fcoverage-mapping "

RUNTIME = "llvm"

CLANGSDK = "1"

 

While these scoped coverage compiler flags are required to ensure that any packages that are non-clangable can fall back to compiling with GCC, building either a single package (bash using command bitbake bash) or an image (using bitbake core-image-minimal) results in everything being successfully compiled using GCC (i.e. clang never being deemed appropriate used as the compiler).

More concerningly, bitbaking this example package/ image with the meta-clang layer completely deleted from the poky repo does not result in a failure to build either item (seeming to suggest there is no dependency on meta-clang content from the clang compiler/ toolchain).

Please note all of the above has been done on the Poky Kirkstone distribution as Scarthgap was not officially released at the time of this testing (conducted April 26th-30th) and this was also to mitigate any possible patch lag in meta-clang to align it with the Scarthgap release.

Any guidance on rectifying this setup to ensure all possible packages are successfully built as full code-coverage instrumented clang outputs would be much appreciated.

 

Thank you,

Hope