diff options
Diffstat (limited to 'www/firefox-esr/files/patch-bug1513009')
-rw-r--r-- | www/firefox-esr/files/patch-bug1513009 | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/www/firefox-esr/files/patch-bug1513009 b/www/firefox-esr/files/patch-bug1513009 deleted file mode 100644 index 336b80dd30b7..000000000000 --- a/www/firefox-esr/files/patch-bug1513009 +++ /dev/null @@ -1,99 +0,0 @@ -commit 879d99e73974 -Author: Emilio Cobos Álvarez <emilio@crisal.io> -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 |