mirror of
https://github.com/torvalds/linux.git
synced 2026-10-22 12:52:02 +02:00
kbuild: AutoFDO: Update split machine function argument for upstream rename
A recent LLVM commit [1] renamed the internal LLVM plugin option '-split-machine-functions' to '-function-splitting=all', breaking the AutoFDO + ThinLTO build with: ld.lld: error: -plugin-opt=-: ld.lld: Unknown command line argument '-split-machine-functions'. Try: 'ld.lld --help' The plugin option is needed for in-process ThinLTO, so handle the rename accordingly using ld-option. Cc: stable@vger.kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/2186 Fixes:2fd65f7afd("AutoFDO: Enable machine function split optimization for AutoFDO") Link:3e6acc87c5[1] Link: https://patch.msgid.link/20261014-update-autofdo-split-machine-function-option-v1-1-5c71b3005e89@kernel.org Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
parent
46d4ccf3b6
commit
2b358510d5
|
|
@ -22,7 +22,7 @@ ifdef CONFIG_LTO_CLANG_THIN
|
|||
KBUILD_LDFLAGS += --lto-sample-profile=$(CLANG_AUTOFDO_PROFILE)
|
||||
endif
|
||||
KBUILD_LDFLAGS += --mllvm=-enable-fs-discriminator=true --mllvm=-improved-fs-discriminator=true -plugin-opt=thinlto
|
||||
KBUILD_LDFLAGS += -plugin-opt=-split-machine-functions
|
||||
KBUILD_LDFLAGS += $(call ld-option,-plugin-opt=-function-splitting=all,-plugin-opt=-split-machine-functions)
|
||||
endif
|
||||
|
||||
export CFLAGS_AUTOFDO_CLANG RUSTFLAGS_AUTOFDO_CLANG
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user