Commit 0d8d22f
committed
Auto merge of #14370 - weihanglo:build-std, r=Muscraft
fix: std Cargo.lock moved to `library` dir
#14358 didn't check the correct Cargo.lock existence
Perhaps it was there so the test passed,
but after a new nightly is out it is gone.
```
Blocking waiting for file lock on package cache
error: "/home/user/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/Cargo.lock" does not exist, unable to build with the standard library, try:
rustup component add rust-src --toolchain nightly-aarch64-apple-darwin
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
Fixes rust-lang/rust#128808
### How to test the change:
The current nightly `cargo 1.82.0-nightly (94977cb 2024-08-06)` would fail when running
```
cargo +nightly build -Zbuild-std --target <host-triple>
```
After this fix, it should just work
```
RUSTC=~/.rustup/toolchains/nightly-<host-triple>/bin/rustc ./target/debug/cargo build -Zbuild-std --target <host-triple>
```File tree
2 files changed
+4
-3
lines changed- src/cargo/core/compiler
- tests/testsuite
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
0 commit comments