Bug 1560527 - Enable make backend verbose mode automatically rather than relying on mach setting it. r=froydnj a=ritu
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 21 Jun 2019 13:15:30 +0000
changeset 537062 2bee7577b5a687ef6da1cd27852da85d28af2395
parent 537061 29b838345c241ca20986a6dba9843d3f5fc4d09a
child 537063 fd384ae3e04ea04fada7a72d9b2362862c0a3898
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, ritu
bugs1560527
milestone68.0
Bug 1560527 - Enable make backend verbose mode automatically rather than relying on mach setting it. r=froydnj a=ritu This makes running without mach more consistent. e.g. running `make -C $objdir/toolkit/library/rust target` makes the cargo log verbose, and adding `-s` makes it less verbose. Differential Revision: https://phabricator.services.mozilla.com/D35521
config/config.mk
config/rules.mk
python/mozbuild/mozbuild/base.py
--- a/config/config.mk
+++ b/config/config.mk
@@ -432,8 +432,13 @@ ifneq (,$(GNU_CC)$(CLANG_CL))
 OBJS_VAR_SUFFIX := PGO_OBJS
 ifndef NO_PROFILE_GUIDED_OPTIMIZE
 OBJ_SUFFIX := i_o
 endif
 endif
 endif
 
 PLY_INCLUDE = -I$(MOZILLA_DIR)/other-licenses/ply
+
+# Enable verbose logs when not using `make -s`
+ifeq (,$(findstring -s, $(filter-out --%, $(MAKEFLAGS))))
+BUILD_VERBOSE_LOG = 1
+endif
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -41,17 +41,17 @@ endif
 
 endif
 
 EXEC			= exec
 
 # ELOG prints out failed command when building silently (gmake -s). Pymake
 # prints out failed commands anyway, so ELOG just makes things worse by
 # forcing shell invocations.
-ifneq (,$(findstring -s, $(filter-out --%, $(MAKEFLAGS))))
+ifndef BUILD_VERBOSE_LOG
   ELOG := $(EXEC) sh $(MOZILLA_DIR)/build/unix/print-failed-commands.sh
 else
   ELOG :=
 endif # -s
 
 _VPATH_SRCS = $(abspath $<)
 
 ################################################################################
--- a/python/mozbuild/mozbuild/base.py
+++ b/python/mozbuild/mozbuild/base.py
@@ -700,18 +700,16 @@ class MozbuildObject(ProcessExecutionMix
         elif num_jobs > 0:
             args.append('MOZ_PARALLEL_BUILD=%d' % num_jobs)
 
         if ignore_errors:
             args.append('-k')
 
         if silent:
             args.append('-s')
-        else:
-            args.append('BUILD_VERBOSE_LOG=1')
 
         # Print entering/leaving directory messages. Some consumers look at
         # these to measure progress.
         if print_directory:
             args.append('-w')
 
         if keep_going:
             args.append('-k')