Bug 1382511 - Add --output-sync=line to MOZ_MAKE_FLAGS where available. draft
authorChris Manchester <cmanchester@mozilla.com>
Tue, 25 Jul 2017 17:23:25 -0700
changeset 615450 1dd56345f33b2cf19d948d1a87d02b9f2279e3ca
parent 610649 dece50457378ac4934afe9fb3c2a8054e8894588
child 639183 e43b186c5c66657b3d5cf5e146e5f636f361a2bc
push id70365
push userbmo:cmanchester@mozilla.com
push dateWed, 26 Jul 2017 00:23:33 +0000
bugs1382511
milestone56.0a1
Bug 1382511 - Add --output-sync=line to MOZ_MAKE_FLAGS where available. MozReview-Commit-ID: 27FK7x0NcHR
client.mk
--- a/client.mk
+++ b/client.mk
@@ -137,16 +137,19 @@ ifdef MOZ_PARALLEL_BUILD
 endif
 
 # Automatically add -jN to make flags if not defined. N defaults to number of cores.
 ifeq (,$(findstring -j,$(MOZ_MAKE_FLAGS)))
   cores=$(shell $(PYTHON) -c 'import multiprocessing; print(multiprocessing.cpu_count())')
   MOZ_MAKE_FLAGS += -j$(cores)
 endif
 
+ifeq (4.0,$(firstword $(sort 4.0 $(MAKE_VERSION))))
+MOZ_MAKE_FLAGS += --output-sync=line
+endif
 
 ifdef MOZ_BUILD_PROJECTS
 
 ifdef MOZ_CURRENT_PROJECT
   BUILD_PROJECT_ARG = MOZ_BUILD_APP=$(MOZ_CURRENT_PROJECT)
   export MOZ_CURRENT_PROJECT
 else
   MOZ_MAKE = $(error Cannot build in the OBJDIR when MOZ_CURRENT_PROJECT is not set.)