1
Fork 0

Auto merge of #97513 - jyn514:submodule-handling, r=Mark-Simulacrum

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.

To get this working, I also had to remove support for vendoring when using the git sources, because `cargo vendor` requires all submodules to be checked out. I think this is ok; people who care about this are likely already using the pre-vendored `rustc-src` tarball.

Fixes https://github.com/rust-lang/rust/issues/90764. Helps with #94829
This commit is contained in:
bors 2022-06-25 21:01:10 +00:00
commit 20a6f3a8a8
9 changed files with 757 additions and 228 deletions

View file

@ -215,32 +215,6 @@ dependencies = [
"byte-tools",
]
[[package]]
name = "bootstrap"
version = "0.0.0"
dependencies = [
"cc",
"cmake",
"filetime",
"getopts",
"hex 0.4.2",
"ignore",
"libc",
"num_cpus",
"once_cell",
"opener",
"pretty_assertions 0.7.2",
"serde",
"serde_json",
"sha2",
"sysinfo",
"tar",
"toml",
"walkdir",
"winapi",
"xz2",
]
[[package]]
name = "bstr"
version = "0.2.13"
@ -735,15 +709,6 @@ dependencies = [
"rustc-semver",
]
[[package]]
name = "cmake"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb"
dependencies = [
"cc",
]
[[package]]
name = "colored"
version = "2.0.0"
@ -1023,9 +988,9 @@ dependencies = [
[[package]]
name = "ctor"
version = "0.1.15"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39858aa5bac06462d4dd4b9164848eb81ffc4aa5c479746393598fd193afa227"
checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c"
dependencies = [
"quote",
"syn",
@ -2683,9 +2648,9 @@ checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
[[package]]
name = "output_vt100"
version = "0.1.2"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9"
checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66"
dependencies = [
"winapi",
]
@ -2944,18 +2909,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "pretty_assertions"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cab0e7c02cf376875e9335e0ba1da535775beb5450d21e1dffca068818ed98b"
dependencies = [
"ansi_term",
"ctor",
"diff",
"output_vt100",
]
[[package]]
name = "pretty_assertions"
version = "1.2.1"
@ -5162,21 +5115,6 @@ dependencies = [
"unicode-xid",
]
[[package]]
name = "sysinfo"
version = "0.24.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a6a8e71535da31837213ac114531d31def75d7aebd133264e420a3451fa7f703"
dependencies = [
"cfg-if 1.0.0",
"core-foundation-sys",
"libc",
"ntapi",
"once_cell",
"rayon",
"winapi",
]
[[package]]
name = "tar"
version = "0.4.38"
@ -5553,7 +5491,7 @@ dependencies = [
"colored",
"crossbeam",
"lazy_static",
"pretty_assertions 1.2.1",
"pretty_assertions",
"regex",
"rustc_version",
"serde",