diff --git a/Makefile b/Makefile index 1d5c0ab9ed5c..6b8e9fca2752 100644 --- a/Makefile +++ b/Makefile @@ -1045,6 +1045,7 @@ endif ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG_THIN CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit +KBUILD_LDFLAGS += $(call ld-option,--lto-whole-program-visibility -mllvm -always-rename-promoted-locals=false) else CC_FLAGS_LTO := -flto endif