From 4409f0d49385606dc4dd487e8f103d27bc02d2a6 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 10 Jul 2014 14:11:52 +0900 Subject: [PATCH] Bug 1035543 - Remove the MOZ_PSEUDO_DERECURSE variable. r=gps --- Makefile.in | 4 +-- build/autoconf/compiler-opts.m4 | 4 --- build/autoconf/config.status.m4 | 2 -- build/docs/build-targets.rst | 2 -- build/docs/environment-variables.rst | 18 ------------ config/config.mk | 5 ---- config/makefiles/target_binaries.mk | 6 ---- config/recurse.mk | 16 +++++----- config/rules.mk | 2 -- .../mozbuild/backend/recursivemake.py | 29 ++++--------------- 10 files changed, 15 insertions(+), 73 deletions(-) diff --git a/Makefile.in b/Makefile.in index 254def0ac71..dede9c47cf5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -167,7 +167,7 @@ endif endif default all:: - $(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),$(if $(MOZ_PSEUDO_DERECURSE),compile ))libs tools $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS))) + $(call BUILDSTATUS,TIERS export $(if $(COMPILE_ENVIRONMENT),compile )libs tools $(if $(MOZ_AUTOMATION),$(MOZ_AUTOMATION_TIERS))) include $(topsrcdir)/config/rules.mk @@ -309,11 +309,9 @@ config/export: endif -ifdef MOZ_PSEUDO_DERECURSE # Interdependencies for parallel export. js/xpconnect/src/export: dom/bindings/export xpcom/xpidl/export accessible/xpcom/export: xpcom/xpidl/export ifdef ENABLE_CLANG_PLUGIN js/src/export config/export: build/clang-plugin/export endif -endif diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4 index 05e5632d0d6..3322c639ce3 100644 --- a/build/autoconf/compiler-opts.m4 +++ b/build/autoconf/compiler-opts.m4 @@ -184,10 +184,6 @@ fi dnl A high level macro for selecting compiler options. AC_DEFUN([MOZ_COMPILER_OPTS], [ - if test "${MOZ_PSEUDO_DERECURSE-unset}" = unset; then - MOZ_PSEUDO_DERECURSE=1 - fi - MOZ_DEBUGGING_OPTS MOZ_RTTI if test "$CLANG_CXX"; then diff --git a/build/autoconf/config.status.m4 b/build/autoconf/config.status.m4 index 5ae1dc5e6a1..a2f12fe6e13 100644 --- a/build/autoconf/config.status.m4 +++ b/build/autoconf/config.status.m4 @@ -209,5 +209,3 @@ MOZ_RUN_CONFIG_STATUS()], define([AC_CONFIG_HEADER], [m4_fatal([Use CONFIGURE_DEFINE_FILES in moz.build files to produce header files.]) ]) - -AC_SUBST([MOZ_PSEUDO_DERECURSE]) diff --git a/build/docs/build-targets.rst b/build/docs/build-targets.rst index 9035c1fa4d6..dacd46c7f49 100644 --- a/build/docs/build-targets.rst +++ b/build/docs/build-targets.rst @@ -20,7 +20,6 @@ export compile Build the *compile* tier. The *compile* tier compiles all C/C++ files. - Only applies to builds with ``MOZ_PSEUDO_DERECURSE``. libs Build the *libs* tier. The *libs* tier performs linking and performs @@ -36,7 +35,6 @@ binaries: build, but allows for much faster rebuilds of C/C++ code. For performance reasons, however, it skips nss, nspr, icu and ffi. This is targeted to improve local developer workflow when touching C/C++ code. - Only applies to builds with ``MOZ_PSEUDO_DERECURSE``. install-manifests Process install manifests. Install manifests handle the installation of diff --git a/build/docs/environment-variables.rst b/build/docs/environment-variables.rst index e48df632b9f..c4633915968 100644 --- a/build/docs/environment-variables.rst +++ b/build/docs/environment-variables.rst @@ -29,21 +29,3 @@ MACH_NO_WRITE_TIMES If defined, mach commands will not prefix output lines with the elapsed time since program start. This option is equivalent to passing ``--log-no-times`` to mach. - -MOZ_PSEUDO_DERECURSE - Activate an *experimental* build mode where make directory traversal - is derecursified. This mode should result in faster build times at - the expense of busted builds from time-to-time. The end goal is for - this build mode to be the default. At which time, this variable will - likely go away. - - A value of ``1`` activates the mode with full optimizations. - - A value of ``no-parallel-export`` activates the mode without - optimizations to the *export* tier, which are known to be slightly - buggy. - - A value of ``no-skip`` activates the mode without optimizations to skip - some directories during traversal. - - Values may be combined with a comma. diff --git a/config/config.mk b/config/config.mk index f9f55ebb194..09371cfe563 100644 --- a/config/config.mk +++ b/config/config.mk @@ -198,11 +198,6 @@ endif CONFIG_TOOLS = $(MOZ_BUILD_ROOT)/config AUTOCONF_TOOLS = $(topsrcdir)/build/autoconf -# Disable MOZ_PSEUDO_DERECURSE on PGO builds until it's fixed. -ifneq (,$(MOZ_PROFILE_USE)$(MOZ_PROFILE_GENERATE)) -MOZ_PSEUDO_DERECURSE := -endif - # # Strip off the excessively long version numbers on these platforms, # but save the version to allow multiple versions of the same base diff --git a/config/makefiles/target_binaries.mk b/config/makefiles/target_binaries.mk index 2f3499a6b73..d7b48539e46 100644 --- a/config/makefiles/target_binaries.mk +++ b/config/makefiles/target_binaries.mk @@ -100,7 +100,6 @@ endif endif # !NO_DIST_INSTALL -ifdef MOZ_PSEUDO_DERECURSE BINARIES_INSTALL_TARGETS := $(foreach category,$(INSTALL_TARGETS),$(if $(filter binaries,$($(category)_TARGET)),$(category))) # Fill a dependency file with all the binaries installed somewhere in $(DIST) @@ -114,9 +113,4 @@ $(BINARIES_PP): Makefile $(wildcard backend.mk) $(call mkdir_deps,$(MDDEPDIR)) )\ ))binaries: Makefile $(wildcard backend.mk)' | tr % '\n' > $@ -else -binaries:: - $(error The binaries target is not supported without MOZ_PSEUDO_DERECURSE) -endif - # EOF diff --git a/config/recurse.mk b/config/recurse.mk index ce4d64375a7..f465e7d8b2d 100644 --- a/config/recurse.mk +++ b/config/recurse.mk @@ -22,8 +22,7 @@ endif # make -C foo/baz # make -C qux -# MOZ_PSEUDO_DERECURSE can have values other than 1. -ifeq (1_.,$(if $(MOZ_PSEUDO_DERECURSE),1)_$(DEPTH)) +ifeq (.,$(DEPTH)) include root.mk @@ -106,6 +105,8 @@ $(addsuffix /$(CURRENT_TIER),$(filter-out config,$(CURRENT_DIRS))): config/$(CUR endif ifdef COMPILE_ENVIRONMENT +# Disable dependency aggregation on PGO builds because of bug 934166. +ifeq (,$(MOZ_PGO)$(MOZ_PROFILE_USE)$(MOZ_PROFILE_GENERATE)) ifneq (,$(filter libs binaries,$(CURRENT_TIER))) # When doing a "libs" build, target_libs.mk ensures the interesting dependency data # is available in the "binaries" stamp. Once recursion is done, aggregate all that @@ -135,6 +136,8 @@ DIST_GARBAGE += binaries-deps.mk binaries-deps endif +endif + else # Don't recurse if MAKELEVEL is NO_RECURSE_MAKELEVEL as defined above @@ -185,9 +188,7 @@ endif # ifdef TIERS endif # ifeq ($(NO_RECURSE_MAKELEVEL),$(MAKELEVEL)) -endif # ifeq (1_.,$(MOZ_PSEUDO_DERECURSE)_$(DEPTH)) - -ifdef MOZ_PSEUDO_DERECURSE +endif # ifeq (.,$(DEPTH)) ifdef COMPILE_ENVIRONMENT @@ -204,13 +205,14 @@ ALL_DEP_FILES := \ endif binaries libs:: $(TARGETS) $(BINARIES_PP) +# Disable dependency aggregation on PGO builds because of bug 934166. +ifeq (,$(MOZ_PGO)$(MOZ_PROFILE_USE)$(MOZ_PROFILE_GENERATE)) ifneq (.,$(DEPTH)) @$(if $^,$(call py_action,link_deps,-o binaries --group-all --topsrcdir $(topsrcdir) --topobjdir $(DEPTH) --dist $(DIST) $(ALL_DEP_FILES))) endif - endif -endif # ifdef MOZ_PSEUDO_DERECURSE +endif recurse: @$(RECURSED_COMMAND) diff --git a/config/rules.mk b/config/rules.mk index a2b7d51feb3..77d01800f27 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -583,10 +583,8 @@ endif # default rule before including rules.mk default all:: $(MAKE) export -ifdef MOZ_PSEUDO_DERECURSE ifdef COMPILE_ENVIRONMENT $(MAKE) compile -endif endif $(MAKE) libs $(MAKE) tools diff --git a/python/mozbuild/mozbuild/backend/recursivemake.py b/python/mozbuild/mozbuild/backend/recursivemake.py index 71c249a3869..d39e06dd287 100644 --- a/python/mozbuild/mozbuild/backend/recursivemake.py +++ b/python/mozbuild/mozbuild/backend/recursivemake.py @@ -320,13 +320,6 @@ class RecursiveMakeBackend(CommonBackend): 'tools': set(), } - derecurse = self.environment.substs.get('MOZ_PSEUDO_DERECURSE', '').split(',') - self._parallel_export = False - self._no_skip = False - if derecurse != ['']: - self._parallel_export = 'no-parallel-export' not in derecurse - self._no_skip = 'no-skip' in derecurse - def consume_object(self, obj): """Write out build files necessary to build with recursive make.""" @@ -480,11 +473,10 @@ class RecursiveMakeBackend(CommonBackend): convenience variables, and the other dependency definitions for a hopefully proper directory traversal. """ - if not self._no_skip: - for tier, skip in self._may_skip.items(): - self.log(logging.DEBUG, 'fill_root_mk', { - 'number': len(skip), 'tier': tier - }, 'Ignoring {number} directories during {tier}') + for tier, skip in self._may_skip.items(): + self.log(logging.DEBUG, 'fill_root_mk', { + 'number': len(skip), 'tier': tier + }, 'Ignoring {number} directories during {tier}') # Traverse directories in parallel, and skip static dirs def parallel_filter(current, subdirs): @@ -504,14 +496,6 @@ class RecursiveMakeBackend(CommonBackend): current, parallel, sequential = parallel_filter(current, subdirs) return current, subdirs.static + parallel, sequential - # Skip static dirs during export traversal, or build everything in - # parallel when enabled. - def export_filter(current, subdirs): - if self._parallel_export: - return parallel_filter(current, subdirs) - return current, subdirs.parallel, \ - subdirs.dirs + subdirs.tests + subdirs.tools - # Skip tools dirs during libs traversal. Because of bug 925236 and # possible other unknown race conditions, don't parallelize the libs # tier. @@ -531,7 +515,7 @@ class RecursiveMakeBackend(CommonBackend): # compile, binaries and tools tiers use the same traversal as export filters = { - 'export': export_filter, + 'export': parallel_filter, 'compile': compile_filter, 'binaries': parallel_filter, 'libs': libs_filter, @@ -877,9 +861,6 @@ class RecursiveMakeBackend(CommonBackend): if obj.is_tool_dir: fh.write('IS_TOOL_DIR := 1\n') - if self._no_skip: - return - affected_tiers = set(obj.affected_tiers) # Until all SOURCES are really in moz.build, consider all directories # building binaries to require a pass at compile, too.