mirror of
https://abf.rosa.ru/djam/firefox-esr91.git
synced 2025-02-24 01:22:55 +00:00
Updated to 78.2.0
This commit is contained in:
parent
e0d8c0881c
commit
0a009f5b6c
3 changed files with 3 additions and 161 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,4 +1,4 @@
|
|||
sources:
|
||||
cbindgen-vendor.tar.xz: 0cb146ff00b592bbc44f77ac51dc10e607301668
|
||||
firefox-78.1.0esr.source.tar.xz: 814759ee86e47755b1edda18ace8c297f7dd6eb7
|
||||
firefox-78.2.0esr.source.tar.xz: be371c42648f5581cbde2446f4de861d26104758
|
||||
ru@dictionaries.addons.mozilla.org.tar.bz2: 71f9303ba37f20b09fd6aa47f6b592acee06db2c
|
||||
|
|
|
@ -1,152 +0,0 @@
|
|||
|
||||
# HG changeset patch
|
||||
# User Mike Hommey <mh+mozilla@glandium.org>
|
||||
# Date 1595885037 0
|
||||
# Node ID 9181214a2308b5b614e7a60c6e99bd3130a9ed2b
|
||||
# Parent 212d37ac070125486a182c2095f3a87e7581b9dd
|
||||
Bug 1654465 - Set -Cembed-bitcode=yes instead of CARGO_PROFILE_RELEASE_LTO. r=firefox-build-system-reviewers,rstewart, a=RyanVM
|
||||
|
||||
It turns out setting CARGO_PROFILE_RELEASE_LTO has unwanted side
|
||||
effects.
|
||||
|
||||
First it's not actually strictly equivalent to using `cargo rustc --
|
||||
-Clto`. For instance, it apparently also enables cross-language LTO in
|
||||
newer versions of cargo.
|
||||
|
||||
Second, it changes the rust computed hash for all the dependencies of
|
||||
the crate being built with the variable set, which makes them diverge
|
||||
from when the same dependencies are built through another crate in the
|
||||
tree that is not LTOed. This effectively makes us build a _lot_ of
|
||||
crates twice, many of which are not cacheable.
|
||||
|
||||
Since the original problem is that cargo >= 1.45 passes extra flags (`-C
|
||||
embed-bitcode=no`) to rustc that are incompatible with `-Clto`, and while
|
||||
it knows to adjust based on the `lto` setting in the build profile
|
||||
(which CARGO_PROFILE_RELEASE_LTO overrides the default of), cargo
|
||||
ignores flags passed via `cargo rustc -- ...` when making those
|
||||
adjustments.
|
||||
|
||||
So, we need to override with `-C embed-bitcode=yes` on our own at the
|
||||
same time we pass `-Clto`. But doing that through `cargo rustc -- ...`
|
||||
is not enough because all the dependencies of the crate built with
|
||||
`-Clto` need to be built with `-C embed-bitcode=yes`. So we need to
|
||||
override with `RUSTFLAGS`, which will affect all the dependencies.
|
||||
But we also need to do this consistently across all crates, not only the
|
||||
dependencies of crates built with `-Clto`, otherwise we'd still end up
|
||||
building crates twice (once with and once without the override).
|
||||
|
||||
Unfortunately, the `-C embed-bitcode=*` flag is also not supported in
|
||||
versions older than 1.45, so we have to avoid adding it on older
|
||||
versions.
|
||||
|
||||
We unfortunately support a large range of versions of rustc (albeit only
|
||||
for tools/crashreporter), but we actually need to upgrade the smaller
|
||||
supported version because rustc < 1.38 doesn't support our top-level
|
||||
Cargo.lock. This makes the version check slightly less awful.
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D84652
|
||||
|
||||
diff --git a/build/moz.configure/rust.configure b/build/moz.configure/rust.configure
|
||||
--- a/build/moz.configure/rust.configure
|
||||
+++ b/build/moz.configure/rust.configure
|
||||
@@ -141,17 +141,17 @@ def rust_compiler(rustc_info, cargo_info
|
||||
Rust compiler not found.
|
||||
To compile rust language sources, you must have 'rustc' in your path.
|
||||
See https://www.rust-lang.org/ for more information.
|
||||
|
||||
You can install rust by running './mach bootstrap'
|
||||
or by directly running the installer from https://rustup.rs/
|
||||
'''))
|
||||
if build_project == 'tools/crashreporter':
|
||||
- rustc_min_version = Version('1.31.0')
|
||||
+ rustc_min_version = Version('1.38.0')
|
||||
else:
|
||||
rustc_min_version = Version('1.41.0')
|
||||
cargo_min_version = rustc_min_version
|
||||
|
||||
version = rustc_info.version
|
||||
if version < rustc_min_version:
|
||||
die(dedent('''\
|
||||
Rust compiler {} is too old.
|
||||
diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk
|
||||
--- a/config/makefiles/rust.mk
|
||||
+++ b/config/makefiles/rust.mk
|
||||
@@ -56,21 +56,22 @@ endif
|
||||
# These flags are passed via `cargo rustc` and only apply to the final rustc
|
||||
# invocation (i.e., only the top-level crate, not its dependencies).
|
||||
cargo_rustc_flags = $(CARGO_RUSTCFLAGS)
|
||||
ifndef DEVELOPER_OPTIONS
|
||||
ifndef MOZ_DEBUG_RUST
|
||||
# Enable link-time optimization for release builds, but not when linking
|
||||
# gkrust_gtest.
|
||||
ifeq (,$(findstring gkrust_gtest,$(RUST_LIBRARY_FILE)))
|
||||
-# Pass -Clto for older versions of rust, and CARGO_PROFILE_RELEASE_LTO=true
|
||||
-# for newer ones that support it. Combining the latter with -Clto works, so
|
||||
-# set both everywhere.
|
||||
cargo_rustc_flags += -Clto
|
||||
-export CARGO_PROFILE_RELEASE_LTO=true
|
||||
+endif
|
||||
+# Versions of rust >= 1.45 need -Cembed-bitcode=yes for all crates when
|
||||
+# using -Clto.
|
||||
+ifeq (,$(filter 1.38.% 1.39.% 1.40.% 1.41.% 1.42.% 1.43.% 1.44.%,$(RUSTC_VERSION)))
|
||||
+RUSTFLAGS += -Cembed-bitcode=yes
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CARGO_INCREMENTAL
|
||||
export CARGO_INCREMENTAL
|
||||
endif
|
||||
|
||||
diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
|
||||
--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
|
||||
+++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
|
||||
@@ -1786,23 +1786,16 @@ class RustTest(BaseConfigureTest):
|
||||
self.assertEqual(
|
||||
self.get_rust_target('arm-unknown-linux-androideabi',
|
||||
arm_target=ReadOnlyNamespace(
|
||||
arm_arch=7, fpu='neon', thumb2=True, float_abi='softfp')),
|
||||
'thumbv7neon-linux-androideabi')
|
||||
|
||||
self.assertEqual(
|
||||
self.get_rust_target('arm-unknown-linux-androideabi',
|
||||
- version='1.32.0',
|
||||
- arm_target=ReadOnlyNamespace(
|
||||
- arm_arch=7, fpu='neon', thumb2=True, float_abi='softfp')),
|
||||
- 'armv7-linux-androideabi')
|
||||
-
|
||||
- self.assertEqual(
|
||||
- self.get_rust_target('arm-unknown-linux-androideabi',
|
||||
arm_target=ReadOnlyNamespace(
|
||||
arm_arch=7, fpu='neon', thumb2=False, float_abi='softfp')),
|
||||
'armv7-linux-androideabi')
|
||||
|
||||
self.assertEqual(
|
||||
self.get_rust_target('arm-unknown-linux-androideabi',
|
||||
arm_target=ReadOnlyNamespace(
|
||||
arm_arch=7, fpu='vfpv2', thumb2=True, float_abi='softfp')),
|
||||
@@ -1811,23 +1804,16 @@ class RustTest(BaseConfigureTest):
|
||||
self.assertEqual(
|
||||
self.get_rust_target('armv7-unknown-linux-gnueabihf',
|
||||
arm_target=ReadOnlyNamespace(
|
||||
arm_arch=7, fpu='neon', thumb2=True, float_abi='hard')),
|
||||
'thumbv7neon-unknown-linux-gnueabihf')
|
||||
|
||||
self.assertEqual(
|
||||
self.get_rust_target('armv7-unknown-linux-gnueabihf',
|
||||
- version='1.32.0',
|
||||
- arm_target=ReadOnlyNamespace(
|
||||
- arm_arch=7, fpu='neon', thumb2=True, float_abi='hard')),
|
||||
- 'armv7-unknown-linux-gnueabihf')
|
||||
-
|
||||
- self.assertEqual(
|
||||
- self.get_rust_target('armv7-unknown-linux-gnueabihf',
|
||||
arm_target=ReadOnlyNamespace(
|
||||
arm_arch=7, fpu='neon', thumb2=False, float_abi='hard')),
|
||||
'armv7-unknown-linux-gnueabihf')
|
||||
|
||||
self.assertEqual(
|
||||
self.get_rust_target('armv7-unknown-linux-gnueabihf',
|
||||
arm_target=ReadOnlyNamespace(
|
||||
arm_arch=7, fpu='vfpv2', thumb2=True, float_abi='hard')),
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
%endif
|
||||
|
||||
%define oname firefox
|
||||
%define major 78.1.0
|
||||
%define major 78.2.0
|
||||
%define ff_epoch 0
|
||||
# (tpg) set version HERE !!!
|
||||
%define realver %{major}
|
||||
|
@ -54,7 +54,7 @@ Summary: Next generation web browser
|
|||
Name: firefox-esr78
|
||||
Version: %{major}
|
||||
Epoch: %{ff_epoch}
|
||||
Release: 2
|
||||
Release: 1
|
||||
License: MPLv1+
|
||||
Group: Networking/WWW
|
||||
Url: http://www.mozilla.com/firefox/
|
||||
|
@ -91,11 +91,6 @@ Patch300: firefox-56.0-build-error.patch
|
|||
# Build errors in 62.0
|
||||
Patch302: firefox-62.0.2-include-cmath.patch
|
||||
|
||||
# error: options `-C embed-bitcode=no` and `-C lto` are incompatible
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1654465
|
||||
# fixed 78.2esr
|
||||
Patch303: 9181214a2308.patch
|
||||
|
||||
BuildRequires: gtk+2-devel
|
||||
%if %{toolkit_gtk3}
|
||||
BuildRequires: gtk+3-devel
|
||||
|
@ -255,7 +250,6 @@ Files and macros mainly for building Firefox extensions.
|
|||
%patch300 -p1
|
||||
%endif
|
||||
%patch302 -p1
|
||||
%patch303 -p1
|
||||
|
||||
pushd js/src
|
||||
autoconf-2.13
|
||||
|
|
Loading…
Add table
Reference in a new issue