]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
lto.inc: add clang specific LTO configuration
authormark.yang <mark.yang@lge.com>
Thu, 22 Jan 2026 05:51:43 +0000 (14:51 +0900)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 27 Jan 2026 11:37:48 +0000 (11:37 +0000)
commit253da2e6fc0aa01cbd1b249cfcca35d9fe7740ba
tree32efbb3e2f4ca82ce86b3b19e9cfba012e4758d6
parentb4b1538395128a8c1387b6db74546ca447219364
lto.inc: add clang specific LTO configuration

This commit adds support for Clang-specific LTO options.

1. -fuse-linker-plugin is not supported by Clang.
2. -ffat-lto-objects is used to ensure that object files (.o) are generated as ELF
   even when LTO is applied. During the dwarfsrcfiles process, if LTO is used
   with the Clang toolchain, static library object files are skipped if they are
   LLVM bitcode instead of ELF. Therefore, it is recommended to add this to
   LTOEXTRA if necessary.
3. Adding 'thin-lto' to DISTRO_FEATURES enables -flto=thin.

Signed-off-by: mark.yang <mark.yang@lge.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/lto.inc