aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2019-08-14 15:07:06 +0800
committerjbeich <jbeich@FreeBSD.org>2019-08-14 15:07:06 +0800
commit1b00fe0c6a39903ac2872be157cfff57ce0a5ee6 (patch)
tree7a0c16a555af2bac2d29fc2cb3db3b4d274c681b
parent6c6bfcaf65096dc30c96bf62eae2077636ef65b6 (diff)
downloadfreebsd-ports-gnome-1b00fe0c6a39903ac2872be157cfff57ce0a5ee6.tar.gz
freebsd-ports-gnome-1b00fe0c6a39903ac2872be157cfff57ce0a5ee6.tar.zst
freebsd-ports-gnome-1b00fe0c6a39903ac2872be157cfff57ce0a5ee6.zip
www/firefox-esr: unbreak with rust 1.37
error: trait objects without an explicit `dyn` are deprecated --> gfx/webrender_bindings/src/bindings.rs:471:28 | 471 | fn clone(&self) -> Box<RenderNotifier> { | ^^^^^^^^^^^^^^ help: use `dyn`: `dyn RenderNotifier` | note: lint level defined here --> gfx/webrender_bindings/src/lib.rs:5:9 | 5 | #![deny(warnings)] | ^^^^^^^^ = note: #[deny(bare_trait_objects)] implied by #[deny(warnings)] error: trait objects without an explicit `dyn` are deprecated --> gfx/webrender_bindings/src/bindings.rs:736:30 | 736 | let recorder: Option<Box<ApiRecordingReceiver>> = if unsafe { gfx_use_wrench() } { | ^^^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn ApiRecordingReceiver` error: trait objects without an explicit `dyn` are deprecated --> gfx/webrender_bindings/src/moz2d_renderer.rs:98:28 | 98 | resources: &BlobImageResources, | ^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn BlobImageResources` error: trait objects without an explicit `dyn` are deprecated --> gfx/webrender_bindings/src/moz2d_renderer.rs:136:65 | 136 | fn process_fonts(mut extra_data: BufReader, resources: &BlobImageResources) { | ^^^^^^^^^^^^^^^^^^ help: use `dyn`: `dyn BlobImageResources` error: aborting due to 4 previous errors error: Could not compile `webrender_bindings`. Reported by: tobik Obtained from: upstream (Firefox 68)
-rw-r--r--www/firefox-esr/files/patch-bug151300999
-rw-r--r--www/firefox-esr/files/patch-bug153065027
2 files changed, 126 insertions, 0 deletions
diff --git a/www/firefox-esr/files/patch-bug1513009 b/www/firefox-esr/files/patch-bug1513009
new file mode 100644
index 000000000000..336b80dd30b7
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug1513009
@@ -0,0 +1,99 @@
+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
diff --git a/www/firefox-esr/files/patch-bug1530650 b/www/firefox-esr/files/patch-bug1530650
new file mode 100644
index 000000000000..a78b39fd2a96
--- /dev/null
+++ b/www/firefox-esr/files/patch-bug1530650
@@ -0,0 +1,27 @@
+commit 146d61ba71d0
+Author: Mike Hommey <mh+mozilla@glandium.org>
+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
+