changeset 51743:d5d5f6658b12

8207001: *.obj.log files get truncated causing unreliable incremental builds on Windows Reviewed-by: erikj, tbell Contributed-by: ralf.schmelter@sap.com
author erikj
date Thu, 12 Jul 2018 16:30:47 +0200
parents 2e675859332a
children 2f4c3cac8556
files make/common/MakeBase.gmk
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/MakeBase.gmk	Thu Jul 12 07:14:30 2018 -0700
+++ b/make/common/MakeBase.gmk	Thu Jul 12 16:30:47 2018 +0200
@@ -1015,7 +1015,7 @@
   $(call LogCmdlines, Exececuting: [$(strip $2)]) \
   $(call MakeDir, $(dir $(strip $1))) \
   $(call WriteFile, $2, $(strip $1).cmdline) \
-  ( $(strip $2) > >($(TEE) $(strip $1).log) 2> >($(TEE) $(strip $1).log >&2) || \
+  ( $(RM) $(strip $1).log && $(strip $2) > >($(TEE) -a $(strip $1).log) 2> >($(TEE) -a $(strip $1).log >&2) || \
       ( exitcode=$(DOLLAR)? && \
       $(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).log && \
       $(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \