Skip to content

Commit 19b2898

Browse files
committed
8256751: Incremental rebuild with precompiled header fails when touching a header file
Reviewed-by: ihse
1 parent 4dd71ae commit 19b2898

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

make/common/NativeCompilation.gmk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,13 +805,15 @@ define SetupNativeCompilationBody
805805
-include $$($1_PCH_DEPS_TARGETS_FILE)
806806

807807
$1_PCH_COMMAND := $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \
808-
$$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) $$($1_PCH_DEPS_FILE)
808+
$$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) \
809+
$$(addsuffix .tmp, $$($1_PCH_DEPS_FILE))
809810

810811
$$($1_PCH_FILE): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE)
811812
$$(call LogInfo, Generating precompiled header)
812813
$$(call MakeDir, $$(@D))
813814
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
814815
$$($1_PCH_COMMAND) $$< -o $$@))
816+
$$(call fix-deps-file, $$($1_PCH_DEPS_FILE))
815817
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_PCH_DEPS_FILE) \
816818
> $$($1_PCH_DEPS_TARGETS_FILE)
817819

0 commit comments

Comments
 (0)