Bug 1530650 - Add --cap-lints warn to RUSTFLAGS when not building with --enable-warnings-as-errors. r=froydnj a=jcristau
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 22 May 2019 12:59:01 +0000
changeset 536435 66dc57c3cf310258fe2d0e8dc31942ded5c91626
parent 536434 37d53d3dcb7d8a38ed853a0222a2a0080f011afc
child 536436 de5bd9e725c461391d517148db35634c990ebe90
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj, jcristau
bugs1530650
milestone68.0
Bug 1530650 - Add --cap-lints warn to RUSTFLAGS when not building with --enable-warnings-as-errors. r=froydnj a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D32080
build/moz.configure/warnings.configure
--- a/build/moz.configure/warnings.configure
+++ b/build/moz.configure/warnings.configure
@@ -16,16 +16,18 @@ add_old_configure_assignment(
 @depends('--enable-warnings-as-errors')
 def rust_warning_flags(warnings_as_errors):
     flags = []
 
     # Note that cargo passes --cap-lints warn to rustc for third-party code, so
     # we don't need a very complicated setup.
     if warnings_as_errors:
         flags.append('-Dwarnings')
+    else:
+        flags.extend(('--cap-lints', 'warn'))
 
     return flags
 
 
 # GCC/Clang warnings:
 # https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
 # https://clang.llvm.org/docs/DiagnosticsReference.html