Re: [poky][kirkstone][clang] Poky Clang Toolchain with Code Coverage Flags
Khem Raj <[email protected]>
| Newsgroups | org.yoctoproject.lists.poky |
|---|---|
| Message-ID | <CAMKF1srRpD26yy3iZpWJZrQUQ+zqeNYKUoKHkxL2tkx7Qoz1bw@mail.gmail.com> |
Not really clear what you are expecting here. usually layers are inert so when you remove them the defaults from poky are picked up and the options above become nops since they dont make much sense for setups which do not use meta-clang, therefore successful builds without meta-clang is not surprising. I sense that you are trying to report that when you use meta-clang, then the setup is not using clang compiler and the needed flags are also not propagated. If thats the case, then I am hoping that meta-clang is added to conf/bblayers.conf as well, otherwise bitbake does not see the layer when parsing metadata and does not consider it as part of the build. On Tue, Apr 30, 2024 at 7:11 PM Hope Sneddon via lists.yoctoproject.org <[email protected]> wrote: > > 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 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#13333): https://lists.yoctoproject.org/g/poky/message/13333 > Mute This Topic: https://lists.yoctoproject.org/mt/105834320/1997914 > Group Owner: [email protected] > Unsubscribe: https://lists.yoctoproject.org/g/poky/unsub [[email protected]] > -=-=-=-=-=-=-=-=-=-=-=- >