Bug 1416052 - Move config.guess logic to Python; r=nalexander draft
authorGregory Szorc <gps@mozilla.com>
Thu, 09 Nov 2017 16:17:35 -0800
changeset 697341 8de8ac1009f65993b25a14d25d68b4abc98a4cc8
parent 697340 041cf2c366d3992f0a57ac4a9eb0c6680d328046
child 697342 d86f00b120dd5fadacc7d27df3b0aaa39afb7e78
push id88985
push userbmo:gps@mozilla.com
push dateMon, 13 Nov 2017 23:04:28 +0000
reviewersnalexander
bugs1416052
milestone59.0a1
Bug 1416052 - Move config.guess logic to Python; r=nalexander Instead of evaluating config.guess in client.mk, we evaluate it in Python. The Python code also looks for CONFIG_GUESS in the mozconfig. This still happens in client.mk courtesy of evaling the mozconfig's relevant parts. MozReview-Commit-ID: 87NmQiB2ccX
client.mk
python/mozbuild/mozbuild/controller/building.py
--- a/client.mk
+++ b/client.mk
@@ -29,18 +29,16 @@ endif
 CWD := $(CURDIR)
 
 ifeq "$(CWD)" "/"
 CWD   := /.
 endif
 
 PYTHON ?= $(shell which python2.7 > /dev/null 2>&1 && echo python2.7 || echo python)
 
-CONFIG_GUESS := $(shell $(TOPSRCDIR)/build/autoconf/config.guess)
-
 ####################################
 # Load mozconfig Options
 
 # See build pages, http://www.mozilla.org/build/ for how to set up mozconfig.
 
 define CR
 
 
--- a/python/mozbuild/mozbuild/controller/building.py
+++ b/python/mozbuild/mozbuild/controller/building.py
@@ -1316,16 +1316,18 @@ class BuildDriver(MozbuildObject):
             install_test_files(mozpath.normpath(self.topsrcdir), self.topobjdir,
                                '_tests', test_objs)
 
     def _run_client_mk(self, target=None, line_handler=None, jobs=0,
                        verbose=None, keep_going=False, append_env=None):
         append_env = dict(append_env or {})
         append_env['TOPSRCDIR'] = self.topsrcdir
 
+        append_env['CONFIG_GUESS'] = self.resolve_config_guess()
+
         return self._run_make(srcdir=True,
                               filename='client.mk',
                               allow_parallel=False,
                               ensure_exit_code=False,
                               print_directory=False,
                               target=target,
                               line_handler=line_handler,
                               log=False,