Skip to contentSkip to conversation

kbuild: remove .thinlto-cache by 'make clean'

PATCH Applied Masahiro Yamada 2 participants 3 messages Feb 25, 2021 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: remove .thinlto-cache by 'make clean'

'make clean' should remove build artifacts unneeded by external module builds. Obviously, you do not need to keep this directory.

Fixes dc5723b02e52 ("kbuild: add support for Clang LTO")

---

 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index b18dbc634690..8601a86ebe38 100644
@@ -1501,7 +1501,7 @@ endif # CONFIG_MODULES
 # Directories & files removed with 'make clean'
 CLEAN_FILES += include/ksym vmlinux.symvers \
 	       modules.builtin modules.builtin.modinfo modules.nsdeps \
-	       compile_commands.json
+	       compile_commands.json .thinlto-cache
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_FILES += include/config include/generated          \
@@ -1515,7 +1515,7 @@ MRPROPER_FILES += include/config include/generated          \
 		  *.spec
 
 # Directories & files removed with 'make distclean'
-DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS .thinlto-cache
+DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
 
 # clean - Delete most, but leave enough to build external modules
 #
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Masahiro Yamada

'make clean' should remove build artifacts unneeded by external module builds. Obviously, you do not need to keep this directory.

As in, it should exist in the "clean" target, rather than "distclean"?

Quoted 3 lines
Fixes dc5723b02e52 ("kbuild: add support for Clang LTO")

That works for me!

-Kees

Quoted 30 lines

---

 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index b18dbc634690..8601a86ebe38 100644
@@ -1501,7 +1501,7 @@ endif # CONFIG_MODULES
 # Directories & files removed with 'make clean'
 CLEAN_FILES += include/ksym vmlinux.symvers \
 	       modules.builtin modules.builtin.modinfo modules.nsdeps \
-	       compile_commands.json
+	       compile_commands.json .thinlto-cache
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_FILES += include/config include/generated          \
@@ -1515,7 +1515,7 @@ MRPROPER_FILES += include/config include/generated          \
 		  *.spec
 
 # Directories & files removed with 'make distclean'
-DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS .thinlto-cache
+DISTCLEAN_FILES += tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS
 
 # clean - Delete most, but leave enough to build external modules
 #
Signature · 1 line
2.27.0
Signature · 1 line
Kees Cook