Skip to content

Commit

Permalink
clang.bbclass: Use ld.lld as default for LD with ld-is-lld
Browse files Browse the repository at this point in the history
When ld-is-lld is in DISTRO_FEATURE, user wants to use lld as system
linker, therefore honor the setting for bare linker as well, for compiler
its being taken care by clang itself using -fuse-ld=lld

Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Oct 10, 2024
1 parent 95e84ca commit 835896f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions classes/clang.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ OBJCOPY:toolchain-clang = "${HOST_PREFIX}llvm-objcopy"
STRIP:toolchain-clang = "${HOST_PREFIX}llvm-strip"
STRINGS:toolchain-clang = "${HOST_PREFIX}llvm-strings"
READELF:toolchain-clang = "${HOST_PREFIX}llvm-readelf"
LD:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '${HOST_PREFIX}ld.lld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', '${HOST_PREFIX}ld${TOOLCHAIN_OPTIONS} ${HOST_LD_ARCH}', d)}"

LTO:toolchain-clang = "${@bb.utils.contains('DISTRO_FEATURES', 'thin-lto', '-flto=thin', '-flto -fuse-ld=lld', d)}"

Expand Down

0 comments on commit 835896f

Please sign in to comment.