Bug 1417684 - Always evaluate config environment; r?build draft
authorGregory Szorc <gps@mozilla.com>
Fri, 27 Oct 2017 17:14:00 -0700
changeset 700680 6f70900c5d4f001d4e709d6bd21c258dda09eef8
parent 700679 c0b8fd0f84167547473a865c6744a5eebc426eb9
child 700681 164959135d2ba6ab5e28293bf95cd09b0b103b9d
push id89935
push userbmo:gps@mozilla.com
push dateMon, 20 Nov 2017 19:05:20 +0000
reviewersbuild
bugs1417684
milestone59.0a1
Bug 1417684 - Always evaluate config environment; r?build I /think/ the only scenario where we wouldn't be able to evaluate a config environment after configure was the case where MOZ_BUILD_PROJECTS was in play. Since we removed support for that feature, let's drop support for treating the config environment as optional. MozReview-Commit-ID: 4sz9dOwaA3y
python/mozbuild/mozbuild/controller/building.py
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -1091,39 +1091,30 @@ class BuildDriver(MozbuildObject):
                         keep_going=keep_going)
 
                     if status != 0:
                         break
             else:
                 # Try to call the default backend's build() method. This will
                 # run configure to determine BUILD_BACKENDS if it hasn't run
                 # yet.
-                config = None
                 try:
                     config = self.config_environment
                 except Exception:
                     config_rc = self.configure(buildstatus_messages=True,
                                                line_handler=output.on_line)
                     if config_rc != 0:
                         return config_rc
 
-                    # Even if configure runs successfully, we may have trouble
-                    # getting the config_environment for some builds, such as
-                    # OSX Universal builds. These have to go through client.mk
-                    # regardless.
-                    try:
-                        config = self.config_environment
-                    except Exception:
-                        pass
+                    config = self.config_environment
 
-                if config:
-                    active_backend = config.substs.get('BUILD_BACKENDS', [None])[0]
-                    if active_backend:
-                        backend_cls = get_backend_class(active_backend)(config)
-                        status = backend_cls.build(self, output, jobs, verbose)
+                active_backend = config.substs.get('BUILD_BACKENDS', [None])[0]
+                if active_backend:
+                    backend_cls = get_backend_class(active_backend)(config)
+                    status = backend_cls.build(self, output, jobs, verbose)
 
                 # If the backend doesn't specify a build() method, then just
                 # call client.mk directly.
                 if status is None:
                     status = self._run_client_mk(line_handler=output.on_line,
                                                  jobs=jobs,
                                                  verbose=verbose,
                                                  keep_going=keep_going)