Bug 1530650 - Add --cap-lints warn to RUSTFLAGS when not building with --enable-warnings-as-errors. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 22 May 2019 12:59:01 +0000
changeset 475039 7a5f5a8174f74faf91e6be592b0047936b3d7ae9
parent 475038 36cedc578185a8a28d31e339debc5dd2166212cd
child 475040 6d063a63bece58fc08ea417c7f00524de57ab59d
push id86136
push usermh@glandium.org
push dateWed, 22 May 2019 22:01:59 +0000
treeherderautoland@7a5f5a8174f7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1530650
milestone69.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 1530650 - Add --cap-lints warn to RUSTFLAGS when not building with --enable-warnings-as-errors. r=froydnj 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