Fully remove submodule handling from bootstrap.py
These submodules were previously updated in python because Cargo gives a hard error if toml files are missing from the workspace: ``` error: failed to load manifest for workspace member `/home/jnelson/rust-lang/rust/src/tools/rls` Caused by: failed to read `/home/jnelson/rust-lang/rust/src/tools/rls/Cargo.toml` Caused by: No such file or directory (os error 2) failed to run: /home/jnelson/rust-lang/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /home/jnelson/rust-lang/rust/src/bootstrap/Cargo.toml ``` However, bootstrap doesn't actually need to be part of the workspace. Remove it so we can move submodule handling fully to Rust, avoiding duplicate code between Rust and Python. Note that this does break `cargo run`; it has to be `cd src/bootstrap && cargo run` now. Given that we're planning to make the main entrypoint a shell script (or rust binary), I think this is a good tradeoff for reduced complexity in bootstrap.py.
This commit is contained in:
@@ -537,6 +537,20 @@ impl Build {
|
||||
build.local_rebuild = true;
|
||||
}
|
||||
|
||||
// Make sure we update these before gathering metadata so we don't get an error about missing
|
||||
// Cargo.toml files.
|
||||
let rust_submodules = [
|
||||
"src/tools/rust-installer",
|
||||
"src/tools/cargo",
|
||||
"src/tools/rls",
|
||||
"src/tools/miri",
|
||||
"library/backtrace",
|
||||
"library/stdarch",
|
||||
];
|
||||
for s in rust_submodules {
|
||||
build.update_submodule(Path::new(s));
|
||||
}
|
||||
|
||||
build.verbose("learning about cargo");
|
||||
metadata::build(&mut build);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user