diff --git a/Makefile b/Makefile index 668909e7a460..2233951666f7 100644 --- a/Makefile +++ b/Makefile @@ -895,10 +895,10 @@ endif ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG_THIN -CC_FLAGS_LTO += -flto=thin -fsplit-lto-unit +CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod-prefix).thinlto-cache else -CC_FLAGS_LTO += -flto +CC_FLAGS_LTO := -flto endif CC_FLAGS_LTO += -fvisibility=hidden