This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 71ff1c6
committed
Auto merge of rust-lang#121341 - GrigorenkoPV:bootstrap-rustup-cargo, r=onur-ozkan
bootstrap: don't resolve symlinks for initial_cargo
I have put the following in my `config.toml`:
```toml
# Includes one of the default files in src/bootstrap/defaults
profile = "compiler"
change-id = 121203
[build]
cargo = "/usr/bin/cargo"
rustc = "/usr/bin/rustc"
rustfmt = "/usr/bin/rustfmt"
```
I have rustup installed from Arch's repos, which has all of the above paths be symlinks to `/usr/bin/rustup`. This works just fine with the `argv[0]` trick that rustup uses.
However, `bootstrap` resolves symlinks to check whether `cargo` exists and then uses the resolved path, so it ends up calling `rustup` directly expecting it to behave like `cargo`. Which it doesn't.
This PR removes the canonicalization step, in turn fixing the issue, but sacrificing a pretty error message. However, this exact thing is checked by `x.py` in advance, so I hope it is not a big deal?1 file changed
+33
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
1418 | 1419 | | |
1419 | 1420 | | |
1420 | 1421 | | |
1421 | | - | |
| 1422 | + | |
1422 | 1423 | | |
1423 | 1424 | | |
1424 | 1425 | | |
1425 | 1426 | | |
1426 | 1427 | | |
1427 | 1428 | | |
1428 | 1429 | | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
1433 | | - | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
1434 | 1439 | | |
1435 | 1440 | | |
1436 | 1441 | | |
| |||
2286 | 2291 | | |
2287 | 2292 | | |
2288 | 2293 | | |
2289 | | - | |
| 2294 | + | |
| 2295 | + | |
2290 | 2296 | | |
2291 | 2297 | | |
2292 | 2298 | | |
2293 | 2299 | | |
2294 | | - | |
2295 | | - | |
2296 | | - | |
2297 | | - | |
2298 | | - | |
2299 | | - | |
2300 | | - | |
2301 | | - | |
2302 | | - | |
2303 | | - | |
2304 | | - | |
2305 | | - | |
2306 | | - | |
2307 | | - | |
2308 | | - | |
| 2300 | + | |
| 2301 | + | |
| 2302 | + | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
2309 | 2313 | | |
2310 | 2314 | | |
2311 | 2315 | | |
2312 | | - | |
2313 | | - | |
2314 | | - | |
2315 | | - | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
2316 | 2320 | | |
2317 | 2321 | | |
2318 | | - | |
2319 | | - | |
2320 | | - | |
2321 | | - | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
2322 | 2325 | | |
2323 | 2326 | | |
2324 | 2327 | | |
| |||
0 commit comments