Bug 1265627 - Check that using the compiler flags we add does what they are intended to do. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 19 Apr 2016 14:48:19 +0900
changeset 331811 54715f7701edf6971457ae99cafd759f285a8ebc
parent 331810 bb60c7a0b0c54ae0be1316d44b7a84098b2985bd
child 331812 98351b5276d089d88260bdff7035d8ca4af46871
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1265627
milestone48.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 1265627 - Check that using the compiler flags we add does what they are intended to do. r=ted While this is not immediately useful, it will be with the next changes.
build/moz.configure/toolchain.configure
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -455,20 +455,32 @@ def compiler(language, host_or_target, c
                     full_path):
                 die('Found `%s` before `%s` in your $PATH. '
                     'Please reorder your $PATH.',
                     quote(os.path.dirname(found_compiler)),
                     quote(os.path.dirname(full_path)))
 
         type, version, more_flags = check_compiler(
             wrapper + [compiler] + flags, language)
+
+        # Check that the additional flags we got are enough to not require any
+        # more flags.
+        if more_flags:
+            flags += more_flags
+            type, version, more_flags = check_compiler(
+                wrapper + [compiler] + flags, language)
+
+        if more_flags:
+            raise FatalCheckError(
+                'Unknown compiler or compiler not supported.')
+
         return namespace(
             wrapper=wrapper,
             compiler=compiler,
-            flags=flags + more_flags,
+            flags=flags,
             type=type,
             version=version,
         )
 
     @depends(valid_compiler)
     @checking('%s version' % what)
     def compiler_version(compiler):
         return compiler.version