diff --git a/Makefile b/Makefile index bfd0c0aa19b3..cd729e17b578 100644 --- a/Makefile +++ b/Makefile @@ -838,12 +838,11 @@ endif ifdef CONFIG_LTO_CLANG ifdef CONFIG_THINLTO -lto-clang-flags := -flto=thin -KBUILD_LDFLAGS += --thinlto-cache-dir=.thinlto-cache +lto-clang-flags := -flto=thin -fsplit-lto-unit else lto-clang-flags := -flto endif -lto-clang-flags += -fvisibility=default $(call cc-option, -fsplit-lto-unit) +lto-clang-flags += -fvisibility=default # Limit inlining across translation units to reduce binary size LD_FLAGS_LTO_CLANG := -mllvm -import-instr-limit=5