mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
kbuild: uapi: use -fsyntax-only rather than -S
The UAPI header tests are checking that the generated headers do not have syntax errors. There's no need to run the rest of the compilation pipeline after semantic analysis has run. Replace -S -o /dev/null with -fsyntax-only. Signed-off-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
3123109284
commit
9a22717b9b
@ -92,7 +92,7 @@ always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/
|
||||
# Include the header twice to detect missing include guard.
|
||||
quiet_cmd_hdrtest = HDRTEST $<
|
||||
cmd_hdrtest = \
|
||||
$(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
|
||||
$(CC) $(c_flags) -fsyntax-only -x c /dev/null \
|
||||
$(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
|
||||
$(PERL) $(srctree)/$(src)/headers_check.pl $(obj) $(SRCARCH) $<; \
|
||||
touch $@
|
||||
|
Loading…
Reference in New Issue
Block a user