Skip to content

Commit

Permalink
Stop using a custom Cargo.toml and Cargo.lock for the standard library
Browse files Browse the repository at this point in the history
The rust-src component now ships a working copy of both.
  • Loading branch information
bjorn3 committed Aug 9, 2024
1 parent d515e88 commit 0e20a76
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 485 deletions.
30 changes: 0 additions & 30 deletions build_system/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,6 @@ pub(crate) fn prepare_stdlib(dirs: &Dirs, rustc: &Path) {
assert!(sysroot_src_orig.exists());

apply_patches(dirs, "stdlib", &sysroot_src_orig, &STDLIB_SRC.to_path(dirs));

std::fs::write(
STDLIB_SRC.to_path(dirs).join("Cargo.toml"),
r#"
[workspace]
resolver = "1"
members = ["./library/sysroot"]
[patch.crates-io]
rustc-std-workspace-core = { path = "./library/rustc-std-workspace-core" }
rustc-std-workspace-alloc = { path = "./library/rustc-std-workspace-alloc" }
rustc-std-workspace-std = { path = "./library/rustc-std-workspace-std" }
# Mandatory for correctly compiling compiler-builtins
[profile.dev.package.compiler_builtins]
debug-assertions = false
overflow-checks = false
codegen-units = 10000
[profile.release.package.compiler_builtins]
debug-assertions = false
overflow-checks = false
codegen-units = 10000
"#,
)
.unwrap();

let source_lockfile = RelPath::PATCHES.to_path(dirs).join("stdlib-lock.toml");
let target_lockfile = STDLIB_SRC.to_path(dirs).join("Cargo.lock");
fs::copy(source_lockfile, target_lockfile).unwrap();
}

pub(crate) struct GitRepo {
Expand Down
Loading

0 comments on commit 0e20a76

Please sign in to comment.