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
--- 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)