Bug 1547038 - ignore unrelated errors when checking compiler flags with ccache; r=chmanchester
authorNathan Froyd <froydnj@mozilla.com>
Tue, 30 Apr 2019 20:04:22 +0000
changeset 530831 cb867ce4e9ce3b40f72bff43df65ac09cffc6b22
parent 530830 a484a2625d18c038723fad2c4032f7859fc51bc3
child 530832 f6230d38f6ef48c2d9c8ca0f41bf1628d4788277
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1547038
milestone68.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 1547038 - ignore unrelated errors when checking compiler flags with ccache; r=chmanchester Using `ccache` apparently interferes with how flag checking is done when we're using `clang` as our compiler. We can work around this by adding a few more flags to flag checking. Differential Revision: https://phabricator.services.mozilla.com/D28895
build/moz.configure/compile-checks.configure
--- a/build/moz.configure/compile-checks.configure
+++ b/build/moz.configure/compile-checks.configure
@@ -154,16 +154,24 @@ def check_and_add_flags(flag, flags_coll
         }[c]
 
         @depends(c, when)
         def result(c, when):
             if when and c.type in ('clang', 'gcc'):
                 return True
 
         if check:
+            @depends(c, dependable(flags))
+            def flags(c, flags):
+                # Don't error out just because clang complains about other things.
+                if c.type == 'clang':
+                    flags += ['-Wno-error=unused-command-line-argument']
+
+                return flags
+
             result = c.try_compile(
                 flags=flags, when=result,
                 check_msg='whether the %s compiler supports %s' % (lang, flag))
 
         @depends(result, list_of_flags)
         def maybe_add_flag(result, list_of_flags):
             if result:
                 list_of_flags.append(flag)