diff --git a/Makefile b/Makefile index bdb982d3e..378599bc5 100755 --- a/Makefile +++ b/Makefile @@ -982,6 +982,7 @@ endif ifdef CONFIG_LTO_CLANG ifdef CONFIG_LTO_CLANG_THIN CC_FLAGS_LTO := -flto=thin -fsplit-lto-unit +KBUILD_LDFLAGS += --thinlto-cache-dir=$(extmod-prefix).thinlto-cache else CC_FLAGS_LTO := -flto endif