Bug 1593502 - Build system does not add -isysroot to the command-line flags for compiler invocations when the provided_compiler has additional flags r=glandium
authorRicky Stewart <rstewart@mozilla.com>
Tue, 12 Nov 2019 00:28:17 +0000
changeset 501600 d3c959c0b75a1fc446a8809d78d82ae4eacdb55b
parent 501599 839d6c2efea375f8b881e4a5218d6abe2e754323
child 501601 c0aebe5e0bc0a4be9e3f275cd5a93e0149875fba
push id100306
push userrstewart@mozilla.com
push dateTue, 12 Nov 2019 16:04:03 +0000
treeherderautoland@d3c959c0b75a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1593502
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1593502 - Build system does not add -isysroot to the command-line flags for compiler invocations when the provided_compiler has additional flags r=glandium Differential Revision: https://phabricator.services.mozilla.com/D52414
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -955,30 +955,26 @@ def compiler(language, host_or_target, c
                           paths=search_path)
 
     @depends(compiler, provided_compiler, compiler_wrapper, host_or_target, macos_sdk)
     @checking('whether %s can be used' % what, lambda x: bool(x))
     @imports(_from='mozbuild.shellutil', _import='quote')
     def valid_compiler(compiler, provided_compiler, compiler_wrapper,
                        host_or_target, macos_sdk):
         wrapper = list(compiler_wrapper or ())
+        flags = prepare_flags(host_or_target, macos_sdk)
         if provided_compiler:
             provided_wrapper = list(provided_compiler.wrapper)
             # When doing a subconfigure, the compiler is set by old-configure
             # and it contains the wrappers from --with-compiler-wrapper and
             # --with-ccache.
             if provided_wrapper[:len(wrapper)] == wrapper:
                 provided_wrapper = provided_wrapper[len(wrapper):]
             wrapper.extend(provided_wrapper)
-            flags = provided_compiler.flags
-        else:
-            flags = []
-
-        if not flags:
-            flags = prepare_flags(host_or_target, macos_sdk)
+            flags.extend(provided_compiler.flags)
 
         info = check_compiler(wrapper + [compiler] + flags, language,
                               host_or_target)
 
         # Check that the additional flags we got are enough to not require any
         # more flags. If we get an exception, just ignore it; it's liable to be
         # invalid command-line flags, which means the compiler we're checking
         # doesn't support those command-line flags and will fail one or more of