Ross Burton, thank you for the review.

The build reproduction steps and the intention for this patch can be found in 
the v1 patch at 
https://lists.openembedded.org/g/openembedded-core/topic/117252728.

PACKAGECONFIG:remove:class-native = "lto thin-lto"
Due to the configuration, llvm-native cannot enable lto in PACKAGECONFIG in any 
way.

When attempting to use clang + lto, components that cannot use the lld linker 
(and instead use the bfd linker) require the LLVMgold.so plugin.
To achieve this, binutils and the -DLLVM_BINUTILS_INCDIR flag in CMake are 
required.
( https://github.com/llvm/llvm-project/blob/main/clang/docs/ThinLTO.rst#basic )

Anyway, llvm-native cannot have LTO enabled due to the `remove`.
-DLLVM_ENABLE_LTO=Full determines whether LLVM itself will be built with LTO 
applied.

However, even if LLVM is not built using LTO, I think the environment should 
still be configured so that other components using the LLVM/clang toolchain can 
use LTO.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#229637): 
https://lists.openembedded.org/g/openembedded-core/message/229637
Mute This Topic: https://lists.openembedded.org/mt/117274480/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to