Skip to content

Commit 0e20a76

Browse files
committed
Stop using a custom Cargo.toml and Cargo.lock for the standard library
The rust-src component now ships a working copy of both.
1 parent d515e88 commit 0e20a76

File tree

2 files changed

+0
-485
lines changed

2 files changed

+0
-485
lines changed

Diff for: build_system/prepare.rs

-30
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,6 @@ pub(crate) fn prepare_stdlib(dirs: &Dirs, rustc: &Path) {
2222
assert!(sysroot_src_orig.exists());
2323

2424
apply_patches(dirs, "stdlib", &sysroot_src_orig, &STDLIB_SRC.to_path(dirs));
25-
26-
std::fs::write(
27-
STDLIB_SRC.to_path(dirs).join("Cargo.toml"),
28-
r#"
29-
[workspace]
30-
resolver = "1"
31-
members = ["./library/sysroot"]
32-
33-
[patch.crates-io]
34-
rustc-std-workspace-core = { path = "./library/rustc-std-workspace-core" }
35-
rustc-std-workspace-alloc = { path = "./library/rustc-std-workspace-alloc" }
36-
rustc-std-workspace-std = { path = "./library/rustc-std-workspace-std" }
37-
38-
# Mandatory for correctly compiling compiler-builtins
39-
[profile.dev.package.compiler_builtins]
40-
debug-assertions = false
41-
overflow-checks = false
42-
codegen-units = 10000
43-
44-
[profile.release.package.compiler_builtins]
45-
debug-assertions = false
46-
overflow-checks = false
47-
codegen-units = 10000
48-
"#,
49-
)
50-
.unwrap();
51-
52-
let source_lockfile = RelPath::PATCHES.to_path(dirs).join("stdlib-lock.toml");
53-
let target_lockfile = STDLIB_SRC.to_path(dirs).join("Cargo.lock");
54-
fs::copy(source_lockfile, target_lockfile).unwrap();
5525
}
5626

5727
pub(crate) struct GitRepo {

0 commit comments

Comments
 (0)