Commit fb0130c
committed
Auto merge of #9365 - jyn514:rustc-bootstrap-crate-name, r=ehuss
Don't give a hard error when the end-user specifies RUSTC_BOOTSTRAP=crate_name
Fixes #9362.
The whole point of rust-lang/rust#77802 was to allow specifying this granularly, giving a hard error defeats the point.
I didn't know how to check what targets were reverse-dependencies of build.rs, so I just unconditionally use the library name (and give a hard error for anything else, even if it's the name of one of the binaries). End-users can still opt-in with RUSTC_BOOTSTRAP=1, and no public binaries use RUSTC_BOOTSTRAP=1, so I don't think this a big deal in practice.
<details><summary>Script to verify all crates using RUSTC_BOOTSTRAP=1 have a library</summary>
```sh
curl https://pastebin.com/raw/fGQ97xP6 | cut -d / -f1 | grep -v shnatsel | grep -v cargo- | sed 's#-\([0-9]\)#/\1#' | xargs -i curl -s -I -L "https://docs.rs/{}/" -w "%{http_code}\n" -o/dev/null
```
It should output 20 200s in a row.
</details>
r? `@ehuss` cc `@mark-simulacrum`
I don't know what cargo's policy is for backports, but this should be backported to 1.52.File tree
3 files changed
+87
-23
lines changed- src/cargo/core
- compiler
- tests/testsuite
3 files changed
+87
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
270 | 269 | | |
271 | 270 | | |
272 | 271 | | |
273 | | - | |
| 272 | + | |
274 | 273 | | |
275 | 274 | | |
276 | 275 | | |
| |||
280 | 279 | | |
281 | 280 | | |
282 | 281 | | |
283 | | - | |
| 282 | + | |
284 | 283 | | |
285 | 284 | | |
286 | 285 | | |
| |||
400 | 399 | | |
401 | 400 | | |
402 | 401 | | |
403 | | - | |
| 402 | + | |
404 | 403 | | |
405 | 404 | | |
406 | 405 | | |
| |||
422 | 421 | | |
423 | 422 | | |
424 | 423 | | |
425 | | - | |
| 424 | + | |
426 | 425 | | |
427 | 426 | | |
428 | 427 | | |
429 | 428 | | |
430 | | - | |
| 429 | + | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
| |||
479 | 478 | | |
480 | 479 | | |
481 | 480 | | |
482 | | - | |
| 481 | + | |
483 | 482 | | |
484 | 483 | | |
485 | 484 | | |
| |||
489 | 488 | | |
490 | 489 | | |
491 | 490 | | |
492 | | - | |
| 491 | + | |
493 | 492 | | |
494 | 493 | | |
495 | 494 | | |
| |||
499 | 498 | | |
500 | 499 | | |
501 | 500 | | |
502 | | - | |
| 501 | + | |
| 502 | + | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
| 505 | + | |
| 506 | + | |
506 | 507 | | |
507 | 508 | | |
508 | 509 | | |
| |||
589 | 590 | | |
590 | 591 | | |
591 | 592 | | |
592 | | - | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
593 | 610 | | |
594 | 611 | | |
595 | 612 | | |
| |||
602 | 619 | | |
603 | 620 | | |
604 | 621 | | |
605 | | - | |
| 622 | + | |
606 | 623 | | |
607 | 624 | | |
608 | 625 | | |
| |||
859 | 876 | | |
860 | 877 | | |
861 | 878 | | |
862 | | - | |
| 879 | + | |
863 | 880 | | |
864 | 881 | | |
865 | 882 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
112 | 118 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
| 131 | + | |
128 | 132 | | |
129 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
130 | 137 | | |
131 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
132 | 175 | | |
0 commit comments