|
|
|
|
@@ -1,21 +1,21 @@
|
|
|
|
|
Teaches Rust's build system to vendor `std`'s dependencies into the
|
|
|
|
|
`rust-src` component.
|
|
|
|
|
Teaches Rust's build system to vendor std's dependencies into the
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
their contents are ignored in favour of the actual stdlib.
|
|
|
|
|
|
|
|
|
|
For Firefox's purposes, these patches still work fine, and are necessary
|
|
|
|
|
to make `-Zbuild-std` work in a vendored environment.
|
|
|
|
|
For firefox's purposes, these patches still work fine, and are necessary
|
|
|
|
|
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
|
|
|
|
|
index 58f86aa996d..ef8c1584011 100644
|
|
|
|
|
index 012d64e5344..aedb53358ef 100644
|
|
|
|
|
--- a/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));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -40,11 +40,7 @@ index 58f86aa996d..ef8c1584011 100644
|
|
|
|
|
+ cmd.env("RUSTC_BOOTSTRAP", "1");
|
|
|
|
|
+ builder.info("Dist src");
|
|
|
|
|
+ let _time = timeit(builder);
|
|
|
|
|
+ builder.run(
|
|
|
|
|
+ &mut cmd,
|
|
|
|
|
+ crate::utils::exec::OutputMode::Print,
|
|
|
|
|
+ crate::utils::exec::OutputMode::Print,
|
|
|
|
|
+ );
|
|
|
|
|
+ builder.run(&mut cmd);
|
|
|
|
|
+
|
|
|
|
|
+ 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
|
|
|
|
|
index 453fb39327d..af579af9eca 100644
|
|
|
|
|
index 5ed6b357e20..ad617948c4b 100644
|
|
|
|
|
--- a/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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -69,7 +65,7 @@ index 453fb39327d..af579af9eca 100644
|
|
|
|
|
+ if src == dst {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ let _ = fs::remove_file(dst);
|
|
|
|
|
+ let _ = fs::remove_file(&dst);
|
|
|
|
|
+ let metadata = t!(src.symlink_metadata());
|
|
|
|
|
+ if let Err(e) = fs::copy(src, dst) {
|
|
|
|
|
+ panic!("failed to copy `{}` to `{}`: {}", src.display(), dst.display(), e)
|
|
|
|
|
@@ -86,32 +82,3 @@ index 453fb39327d..af579af9eca 100644
|
|
|
|
|
/// Links a file from `src` to `dst`.
|
|
|
|
|
/// Attempts to use hard links if possible, falling back to copying.
|
|
|
|
|
/// You can neither rely on this being a copy nor it being a link,
|
|
|
|
|
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 = [
|
|
|
|
|
|