8256751: Incremental rebuild with precompiled header fails when touching a header file

Reviewed-by: ihse
This commit is contained in:
Erik Joelsson 2020-11-20 18:13:56 +00:00
parent 4dd71ae1c5
commit 19b2898691

View File

@ -805,13 +805,15 @@ define SetupNativeCompilationBody
-include $$($1_PCH_DEPS_TARGETS_FILE)
$1_PCH_COMMAND := $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \
$$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) $$($1_PCH_DEPS_FILE)
$$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) \
$$(addsuffix .tmp, $$($1_PCH_DEPS_FILE))
$$($1_PCH_FILE): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE)
$$(call LogInfo, Generating precompiled header)
$$(call MakeDir, $$(@D))
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
$$($1_PCH_COMMAND) $$< -o $$@))
$$(call fix-deps-file, $$($1_PCH_DEPS_FILE))
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_PCH_DEPS_FILE) \
> $$($1_PCH_DEPS_TARGETS_FILE)