Don't put Cargo into the rustc workspace
This causes problems when first cloning and bootstrapping the repository unfortunately, so let's ensure that Cargo sticks around in its own workspace. Because Cargo is a submodule it's not available by default on the inital clone of the rust-lang/rust repository. Normally it's the responsibility of the rustbuild to take care of this, but unfortunately to build rustbuild itself we need to resolve the workspace conflicts. To deal with this we'll just have to ensure that all submodules are in their own workspace, which sort of makes sense anyway as updates to dependencies as bugfixes to Cargo should go to rust-lang/cargo instead of rust-lang/rust. In any case this commit removes Cargo from the global workspace which should resolve the issues that we've been seeing. To actually perform this the `cargo` submodule has been moved to the top directory to ensure it's outside the scope of `src/Cargo.toml` as a workspace.
This commit is contained in:
parent
f573db4f80
commit
c65996ea3b
9 changed files with 30 additions and 677 deletions
|
|
@ -392,6 +392,7 @@ pub fn rust_src(build: &Build) {
|
|||
let src_dirs = [
|
||||
"man",
|
||||
"src",
|
||||
"cargo",
|
||||
];
|
||||
|
||||
let filter_fn = move |path: &Path| {
|
||||
|
|
@ -535,9 +536,9 @@ pub fn cargo(build: &Build, stage: u32, target: &str) {
|
|||
|
||||
let src = build.src.join("src/tools/cargo");
|
||||
let etc = src.join("src/etc");
|
||||
let release_num = &build.crates["cargo"].version;
|
||||
let name = format!("cargo-{}", build.package_vers(release_num));
|
||||
let version = build.cargo_info.version(build, release_num);
|
||||
let release_num = build.cargo_release_num();
|
||||
let name = format!("cargo-{}", build.package_vers(&release_num));
|
||||
let version = build.cargo_info.version(build, &release_num);
|
||||
|
||||
let tmp = tmpdir(build);
|
||||
let image = tmp.join("cargo-image");
|
||||
|
|
@ -594,7 +595,7 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
|
|||
println!("Dist extended stage{} ({})", stage, target);
|
||||
|
||||
let dist = distdir(build);
|
||||
let cargo_vers = &build.crates["cargo"].version;
|
||||
let cargo_vers = build.cargo_release_num();
|
||||
let rustc_installer = dist.join(format!("{}-{}.tar.gz",
|
||||
pkgname(build, "rustc"),
|
||||
target));
|
||||
|
|
@ -943,7 +944,7 @@ pub fn hash_and_sign(build: &Build) {
|
|||
cmd.arg(distdir(build));
|
||||
cmd.arg(today.trim());
|
||||
cmd.arg(build.rust_package_vers());
|
||||
cmd.arg(build.cargo_info.version(build, &build.crates["cargo"].version));
|
||||
cmd.arg(build.cargo_info.version(build, &build.cargo_release_num()));
|
||||
cmd.arg(addr);
|
||||
|
||||
t!(fs::create_dir_all(distdir(build)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue