svn commit: r508892 - head/www/firefox-esr/files
Jan Beich
jbeich at FreeBSD.org
Wed Aug 14 07:07:07 UTC 2019
Author: jbeich
Date: Wed Aug 14 07:07:06 2019
New Revision: 508892
URL: https://svnweb.freebsd.org/changeset/ports/508892
Log:
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)
Added:
head/www/firefox-esr/files/patch-bug1513009 (contents, props changed)
head/www/firefox-esr/files/patch-bug1530650 (contents, props changed)
Added: head/www/firefox-esr/files/patch-bug1513009
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/firefox-esr/files/patch-bug1513009 Wed Aug 14 07:07:06 2019 (r508892)
@@ -0,0 +1,99 @@
+commit 879d99e73974
+Author: Emilio Cobos Álvarez <emilio at 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)
++
++
++ at 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)))
+
+
++ at 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
Added: head/www/firefox-esr/files/patch-bug1530650
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/www/firefox-esr/files/patch-bug1530650 Wed Aug 14 07:07:06 2019 (r508892)
@@ -0,0 +1,27 @@
+commit 146d61ba71d0
+Author: Mike Hommey <mh+mozilla at 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
+
More information about the svn-ports-all
mailing list