Commit 6466a7b
Merge #1024
1024: Fixing superfluous download of pre-built target rust-std when build-s… r=alexhuszagh,emilgardis a=HBchevelle68
This fix prevents the unnecessary download of of the target's pre-built rust-std when the target specified in Cross.toml has `build-std = true`. When this configuration is set, pulling the targets pre-built rust-std is unnecessary and is not used during the build.
An example `Cross.toml` file could look like:
```
[target.x86_64-unknown-freebsd]
build-std = true
```
with respective build commands:
```
cross build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-freebsd --release
```
```
cross build -Z build-std=std,panic_abort -Z build-std-features=panic_immediate_abort --target x86_64-unknown-netbsd --release
```
You will note, the `freebsd` build will not pull the pre-built `freebsd rust-std` and the build will succeed, while the `netbsd` will still pull the pre-built std i.e:
```
info: downloading component 'rust-std' for 'x86_64-unknown-netbsd'
info: installing component 'rust-std' for 'x86_64-unknown-netbsd'
```
Co-authored-by: HBchevelle68 <[email protected]>2 files changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
627 | 628 | | |
628 | 629 | | |
629 | 630 | | |
| |||
0 commit comments