diff --git a/Makefile b/Makefile index 4063ee2d4031..0b68f6a5d343 100644 --- a/Makefile +++ b/Makefile @@ -917,10 +917,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 ifeq ($(SRCARCH),x86)