Index: head/www/firefox-esr/files/patch-bug1513009 =================================================================== --- head/www/firefox-esr/files/patch-bug1513009 (nonexistent) +++ head/www/firefox-esr/files/patch-bug1513009 (revision 508892) @@ -0,0 +1,99 @@ +commit 879d99e73974 +Author: Emilio Cobos Álvarez +Date: Fri Dec 14 12:34:15 2018 +0100 + + Bug 1513009 - Deny Rust warnings on automation. r=ted + + Summary: + I've chosen linux64-debug since it's the most visible build I usually do, but I + could do another build task or something, or use the static analysis builds, or + what not. Just let me know if there's a better way to do this. + + Caveat: This might make updating Rust toolchains a bit more painful. I think + this is better and we should just deal with warnings before updating toolchains, + but I don't know if there'd be strong opposition to that. + + Note that this does _not_ affect third-party code since Cargo passes + `--cap-lint warn` automatically for those. + + Proof that it works: + + * https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ad1e4e1392f71b574cff683e90c7b13bf8781d1 + * https://treeherder.mozilla.org/#/jobs?repo=try&revision=57604f92624bbe49037eee87c56fdb6bf2b5017d + + Reviewers: #firefox-build-system-reviewers, ted + + Reviewed By: #firefox-build-system-reviewers, ted + + Subscribers: reviewbot, glandium, ted + + Bug #: 1513009 + + Differential Revision: https://phabricator.services.mozilla.com/D14083 +--- + build/moz.configure/flags.configure | 8 ++++++++ + build/moz.configure/toolchain.configure | 4 +--- + build/moz.configure/warnings.configure | 12 ++++++++++++ + 3 files changed, 21 insertions(+), 3 deletions(-) + +diff --git build/moz.configure/flags.configure build/moz.configure/flags.configure +index 52212081e0727..3567d6606f012 100644 +--- build/moz.configure/flags.configure ++++ build/moz.configure/flags.configure +@@ -16,3 +16,11 @@ add_old_configure_assignment( + '_COMPILATION_HOST_CFLAGS', compilation_flags.host_cflags) + add_old_configure_assignment( + '_COMPILATION_HOST_CXXFLAGS', compilation_flags.host_cxxflags) ++ ++ ++@depends(rust_compile_flags, rust_warning_flags) ++def rust_flags(compile_flags, warning_flags): ++ return compile_flags + warning_flags ++ ++ ++set_config('MOZ_RUST_DEFAULT_FLAGS', rust_flags) +diff --git build/moz.configure/toolchain.configure build/moz.configure/toolchain.configure +index 8657b8d42641d..c7038fbd2e898 100755 +--- build/moz.configure/toolchain.configure ++++ build/moz.configure/toolchain.configure +@@ -1430,7 +1430,7 @@ imply_option('RUSTC_OPT_LEVEL', '2', when='--enable-re + + @depends('RUSTC_OPT_LEVEL', debug_rust, '--enable-debug-symbols', + moz_optimize) +-def rust_compiler_flags(opt_level_option, debug_rust, debug_symbols, ++def rust_compile_flags(opt_level_option, debug_rust, debug_symbols, + moz_optimize): + optimize = moz_optimize.optimize + +@@ -1479,8 +1479,6 @@ def rust_compiler_flags(opt_level_option, debug_rust, + + return flags + +- +-set_config('MOZ_RUST_DEFAULT_FLAGS', rust_compiler_flags) + + # Linker detection + # ============================================================== +diff --git build/moz.configure/warnings.configure build/moz.configure/warnings.configure +index 33ca79d6a8333..2ff69fdf80b96 100755 +--- build/moz.configure/warnings.configure ++++ build/moz.configure/warnings.configure +@@ -13,6 +13,18 @@ add_old_configure_assignment( + depends('--enable-warnings-as-errors')(lambda x: bool(x))) + + ++@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') ++ ++ return flags ++ ++ + # GCC/Clang warnings: + # https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html + # https://clang.llvm.org/docs/DiagnosticsReference.html Property changes on: head/www/firefox-esr/files/patch-bug1513009 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/firefox-esr/files/patch-bug1530650 =================================================================== --- head/www/firefox-esr/files/patch-bug1530650 (nonexistent) +++ head/www/firefox-esr/files/patch-bug1530650 (revision 508892) @@ -0,0 +1,27 @@ +commit 146d61ba71d0 +Author: Mike Hommey +Date: Wed May 22 12:59:01 2019 +0000 + + 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 + + --HG-- + extra : moz-landing-system : lando +--- + build/moz.configure/warnings.configure | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git build/moz.configure/warnings.configure build/moz.configure/warnings.configure +index cfe541703b613..55d09a0c3568a 100755 +--- build/moz.configure/warnings.configure ++++ build/moz.configure/warnings.configure +@@ -21,6 +21,8 @@ def rust_warning_flags(warnings_as_errors): + # we don't need a very complicated setup. + if warnings_as_errors: + flags.append('-Dwarnings') ++ else: ++ flags.extend(('--cap-lints', 'warn')) + + return flags + Property changes on: head/www/firefox-esr/files/patch-bug1530650 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property