Backed out changeset ed1adda514e3 (bug 1945020) for causing build bustages @cargo-linker. CLOSED TREE

This commit is contained in:
Goloman Adrian
2025-02-20 02:46:08 +02:00
parent 75d808dbae
commit ba170ee295
7 changed files with 19 additions and 65 deletions

View File

@@ -57,7 +57,7 @@ exclude = [
resolver = "2" resolver = "2"
[workspace.package] [workspace.package]
rust-version = "1.82.0" rust-version = "1.76.0"
[workspace.dependencies] [workspace.dependencies]
# Shared across multiple UniFFI consumers. # Shared across multiple UniFFI consumers.

View File

@@ -1,35 +0,0 @@
The version of `rustc` we build had some `compiler-builtins` updates that broke stuff. Later version
of rustc in the 1.82 train landed more `compiler-builtins` updates that unbroke the stuff. We need at
least some of that to make the version of rustc we landed on work.
See also: <https://github.com/rust-lang/rust/pull/128691>
diff --git a/library/alloc/Cargo.toml b/library/alloc/Cargo.toml
index 479eb0a2ba..82d5893dc5 100644
--- a/library/alloc/Cargo.toml
+++ b/library/alloc/Cargo.toml
@@ -10,10 +10,7 @@
[dependencies]
core = { path = "../core" }
-compiler_builtins = { version = "0.1.114", features = ['rustc-dep-of-std'] }
-
-[target.'cfg(not(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")))'.dependencies]
-compiler_builtins = { version = "0.1.114", features = ["no-f16-f128"] }
+compiler_builtins = { version = "0.1.117", features = ['rustc-dep-of-std'] }
[dev-dependencies]
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
diff --git a/library/std/Cargo.toml b/library/std/Cargo.toml
index fe601855cc..06e818fb7c 100644
--- a/library/std/Cargo.toml
+++ b/library/std/Cargo.toml
@@ -17,7 +17,7 @@
panic_unwind = { path = "../panic_unwind", optional = true }
panic_abort = { path = "../panic_abort" }
core = { path = "../core", public = true }
-compiler_builtins = { version = "0.1.114" }
+compiler_builtins = { version = "0.1.117" }
profiler_builtins = { path = "../profiler_builtins", optional = true }
unwind = { path = "../unwind" }
hashbrown = { version = "0.14", default-features = false, features = [

View File

@@ -1,21 +1,21 @@
Teaches Rust's build system to vendor `std`'s dependencies into the Teaches Rust's build system to vendor std's dependencies into the
`rust-src` component. rust-src component.
This was originally landed in <https://github.com/rust-lang/rust/pull/78790>, This was originally landed in https://github.com/rust-lang/rust/pull/78790
but was backed out for causing some breakage for distro maintainers who but was backed out for causing some breakage for distro maintainers who
need to build Rust itself in a vendored/offline context. It doesn't actually need to build Rust itself in a vendored/offline context. It doesn't actually
fetch anything interesting from Crates.io, just the magic fake `std`/`core` crates fetch anything interesting from crates.io, just the magic fake std/core crates
that exist to make the build work right. Those crates *are* vendored but that exist to make the build work right. Those crates *are* vendored but
their contents are ignored in favour of the actual stdlib. their contents are ignored in favour of the actual stdlib.
For Firefox's purposes, these patches still work fine, and are necessary For firefox's purposes, these patches still work fine, and are necessary
to make `-Zbuild-std` work in a vendored environment. to make -Zbuild-std work in a vendored environment.
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
index 58f86aa996d..ef8c1584011 100644 index 012d64e5344..aedb53358ef 100644
--- a/src/bootstrap/src/core/build_steps/dist.rs --- a/src/bootstrap/src/core/build_steps/dist.rs
+++ b/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -941,6 +941,35 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball { @@ -927,6 +927,31 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball {
builder.copy_link(&builder.src.join(file), &dst_src.join(file)); builder.copy_link(&builder.src.join(file), &dst_src.join(file));
} }
@@ -40,11 +40,7 @@ index 58f86aa996d..ef8c1584011 100644
+ cmd.env("RUSTC_BOOTSTRAP", "1"); + cmd.env("RUSTC_BOOTSTRAP", "1");
+ builder.info("Dist src"); + builder.info("Dist src");
+ let _time = timeit(builder); + let _time = timeit(builder);
+ builder.run( + builder.run(&mut cmd);
+ &mut cmd,
+ crate::utils::exec::OutputMode::Print,
+ crate::utils::exec::OutputMode::Print,
+ );
+ +
+ builder.remove(&temp_lock); + builder.remove(&temp_lock);
+ +
@@ -52,10 +48,10 @@ index 58f86aa996d..ef8c1584011 100644
} }
} }
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 453fb39327d..af579af9eca 100644 index 5ed6b357e20..ad617948c4b 100644
--- a/src/bootstrap/src/lib.rs --- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs
@@ -1732,6 +1732,30 @@ fn read_stamp_file(&self, stamp: &Path) -> Vec<(PathBuf, DependencyType)> { @@ -1649,6 +1649,30 @@ fn read_stamp_file(&self, stamp: &Path) -> Vec<(PathBuf, DependencyType)> {
paths paths
} }
@@ -69,7 +65,7 @@ index 453fb39327d..af579af9eca 100644
+ if src == dst { + if src == dst {
+ return; + return;
+ } + }
+ let _ = fs::remove_file(dst); + let _ = fs::remove_file(&dst);
+ let metadata = t!(src.symlink_metadata()); + let metadata = t!(src.symlink_metadata());
+ if let Err(e) = fs::copy(src, dst) { + if let Err(e) = fs::copy(src, dst) {
+ panic!("failed to copy `{}` to `{}`: {}", src.display(), dst.display(), e) + panic!("failed to copy `{}` to `{}`: {}", src.display(), dst.display(), e)

View File

@@ -164,7 +164,7 @@ Here are the Rust versions for each Firefox version.
| Firefox 135 | Rust 1.83.0 | 1.76.0 | 2024 November 28 | 2025 January 2 | 2025 February 4 | Firefox 135 | Rust 1.83.0 | 1.76.0 | 2024 November 28 | 2025 January 2 | 2025 February 4
| Firefox 136 | Rust 1.84.0 | 1.76.0 | 2025 January 9 | 2025 January 30 | 2025 March 4 | Firefox 136 | Rust 1.84.0 | 1.76.0 | 2025 January 9 | 2025 January 30 | 2025 March 4
| **Estimated** | | **Estimated** |
| Firefox 137 | Rust 1.85.0 | 1.82.0 | 2025 February 20 | 2025 February 27 | 2025 April 1 | Firefox 137 | Rust 1.85.0 | ? | 2025 February 20 | 2025 February 27 | 2025 April 1
| Firefox 138 | Rust 1.85.0 | ? | 2025 February 20 | 2025 March 27 | 2025 April 29 | Firefox 138 | Rust 1.85.0 | ? | 2025 February 20 | 2025 March 27 | 2025 April 29
| Firefox 139 | Rust 1.86.0 | ? | 2025 April 3 | 2025 April 24 | 2025 May 27 | Firefox 139 | Rust 1.86.0 | ? | 2025 April 3 | 2025 April 24 | 2025 May 27
| Firefox 140 | Rust 1.87.0 | ? | 2025 May 15 | 2025 May 22 | 2025 June 24 | Firefox 140 | Rust 1.87.0 | ? | 2025 May 15 | 2025 May 22 | 2025 June 24

View File

@@ -13,7 +13,7 @@ from mach.site import PythonVirtualenv
from mach.util import get_state_dir from mach.util import get_state_dir
# Keep in sync with rust-version in top-level Cargo.toml. # Keep in sync with rust-version in top-level Cargo.toml.
MINIMUM_RUST_VERSION = "1.82.0" MINIMUM_RUST_VERSION = "1.76.0"
def get_tools_dir(srcdir=False): def get_tools_dir(srcdir=False):

View File

@@ -379,10 +379,7 @@ rust-1.81.0:
type: git type: git
include-dot-git: true include-dot-git: true
repo: https://github.com/rust-lang/rust/ repo: https://github.com/rust-lang/rust/
# NOTE: This is 1.81.0 and then some, to accommodate compiling some 1.82.0 code without revision: eeb90cda1969383f56a2637cbd3037bdf598841c
# breaking patches we use for sanitizers. See
# <https://bugzilla.mozilla.org/show_bug.cgi?id=1915537> for follow-up.
revision: ab1527f1d6560168f9fd36fa8cd7ba677c1d36ad
rust-nightly: rust-nightly:
description: Rust nightly source code description: Rust nightly source code

View File

@@ -11,12 +11,12 @@ task-defaults:
script: repack_rust.py script: repack_rust.py
toolchain-artifact: public/build/rustc.tar.zst toolchain-artifact: public/build/rustc.tar.zst
linux64-rust-1.82: linux64-rust-1.76:
treeherder: treeherder:
symbol: TL(rust-1.82) symbol: TL(rust-1.76)
run: run:
arguments: [ arguments: [
'--channel', '1.82.0', '--channel', '1.76.0',
'--host', 'x86_64-unknown-linux-gnu', '--host', 'x86_64-unknown-linux-gnu',
'--target', 'x86_64-unknown-linux-gnu', '--target', 'x86_64-unknown-linux-gnu',
'--target', 'i686-unknown-linux-gnu', '--target', 'i686-unknown-linux-gnu',
@@ -110,7 +110,6 @@ linux64-rust-1.81-dev:
RUSTFLAGS_NOT_BOOTSTRAP: '-Clink-arg=-Wl,--undefined-version' RUSTFLAGS_NOT_BOOTSTRAP: '-Clink-arg=-Wl,--undefined-version'
run: run:
arguments: [ arguments: [
'--patch', 'rust-compiler-intrinsics.patch',
'--patch', 'rust-vendor-std.patch', '--patch', 'rust-vendor-std.patch',
'--patch', 'src/tools/cargo:cargo-vendor-std-1.79.patch', '--patch', 'src/tools/cargo:cargo-vendor-std-1.79.patch',
'--channel', 'dev', '--channel', 'dev',
@@ -118,7 +117,6 @@ linux64-rust-1.81-dev:
'--target', 'x86_64-unknown-linux-gnu', '--target', 'x86_64-unknown-linux-gnu',
] ]
resources: resources:
- build/build-rust/rust-compiler-intrinsics.patch
- build/build-rust/rust-vendor-std.patch - build/build-rust/rust-vendor-std.patch
- build/build-rust/cargo-vendor-std-1.79.patch - build/build-rust/cargo-vendor-std-1.79.patch
toolchain-alias: toolchain-alias:
@@ -331,7 +329,6 @@ linux64-rust-nightly-dev:
RUSTFLAGS_NOT_BOOTSTRAP: '-Clink-arg=-Wl,--undefined-version' RUSTFLAGS_NOT_BOOTSTRAP: '-Clink-arg=-Wl,--undefined-version'
run: run:
arguments: [ arguments: [
'--patch', 'rust-compiler-intrinsics.patch',
'--patch', 'rust-vendor-std.patch', '--patch', 'rust-vendor-std.patch',
'--patch', 'src/tools/cargo:cargo-vendor-std-1.79.patch', '--patch', 'src/tools/cargo:cargo-vendor-std-1.79.patch',
'--channel', 'dev', '--channel', 'dev',
@@ -339,7 +336,6 @@ linux64-rust-nightly-dev:
'--target', 'x86_64-unknown-linux-gnu', '--target', 'x86_64-unknown-linux-gnu',
] ]
resources: resources:
- build/build-rust/rust-compiler-intrinsics.patch
- build/build-rust/rust-vendor-std.patch - build/build-rust/rust-vendor-std.patch
- build/build-rust/cargo-vendor-std-1.79.patch - build/build-rust/cargo-vendor-std-1.79.patch
toolchain-alias: toolchain-alias: