[poky][kirkstone][clang] Poky Clang Toolchain with Code Coverage Flags

Hope Sneddon <[email protected]>
Newsgroups org.yoctoproject.lists.poky
Message-ID <SL2P216MB127765CAD0578E6FEFE0D5D399192@SL2P216MB1277.KORP216.PROD.OUTLOOK.COM>
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)<https://lists.yoctoproject.org/g/poky/message/13328>.
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.