From 88694cff4952dba60227f421884ff4140d296900 Mon Sep 17 00:00:00 2001 From: Quentin Perret Date: Fri, 28 Feb 2020 17:20:15 +0000 Subject: kbuild: generate autoksyms.h early When doing a cold build, autoksyms.h starts empty, and is updated late in the build process to have visibility over the symbols used by in-tree drivers. But since the symbol whitelist is known upfront, it can be used to pre-populate autoksyms.h and maximize the amount of code that can be compiled to its final state in a single pass, hence reducing build time. Do this by using gen_autoksyms.sh to initialize autoksyms.h instead of creating an empty file. Acked-by: Nicolas Pitre Tested-by: Matthias Maennich Reviewed-by: Matthias Maennich Signed-off-by: Quentin Perret Signed-off-by: Masahiro Yamada --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5435d11d8276..f8b70cf80d79 100644 --- a/Makefile +++ b/Makefile @@ -1066,9 +1066,12 @@ endif autoksyms_h := $(if $(CONFIG_TRIM_UNUSED_KSYMS), include/generated/autoksyms.h) +quiet_cmd_autoksyms_h = GEN $@ + cmd_autoksyms_h = mkdir -p $(dir $@); \ + $(CONFIG_SHELL) $(srctree)/scripts/gen_autoksyms.sh $@ + $(autoksyms_h): - $(Q)mkdir -p $(dir $@) - $(Q)touch $@ + $(call cmd,autoksyms_h) ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) -- cgit