Commit 8f9bb6c
authored
Rollup merge of rust-lang#121754 - TimNN:split-target, r=Mark-Simulacrum
[bootstrap] Move the `split-debuginfo` setting to the per-target section
As described in rust-lang#112406, bootstrap currently applies the global `split-debuginfo` setting to all artifacts, irrespective of their target triple.
This doesn't cause problems when the "build" triple defaults `split-debuginfo` to `off` (as is the case on Linux, for example).
However, when the "build" triple has `split-debuginfo` enabled and additional target triples are configured, then artifacts for the additional triples will also be built with `split-debuginfo` (despite not necessarily supporting `split-debuginfo`).
rust-lang#112406 mentions `riscv32imc-unknown-none-elf` as one target where this happens, and I've run into this with Wasm as well.
This PR does **not** implement ``@ehuss's`` suggestion that "bootstrap not try to guess how to configure split-debuginfo, and instead use cargo profiles to set it", because that seemed like a lot more significant change.
---
After this PR, anyone explicitly setting `rust.split-debuginfo` should update their configuration to specify the setting in the `target.<triple>` section, though `rust.split-debuginfo` will still be honored for the "build" triple for now.
This PR changes the behavior when `rust.split-debuginfo` was **not** explicitly set **and** bootstrap is configured to cross-compile to a triple that has a different `split-debuginfo` than the "build" triple.
---
If there's a reasonable way to add additional tests for this, please let me know (I didn't find any tests checking cargo arguments in [`builder/tests.rs`](https://github.com/rust-lang/rust/blob/master/src/bootstrap/src/core/builder/tests.rs)).File tree
4 files changed
+69
-25
lines changed- src/bootstrap/src
- core
- config
- utils
4 files changed
+69
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
547 | | - | |
548 | | - | |
| 546 | + | |
| 547 | + | |
549 | 548 | | |
550 | | - | |
| 549 | + | |
551 | 550 | | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
| 551 | + | |
| 552 | + | |
559 | 553 | | |
560 | | - | |
561 | | - | |
562 | | - | |
| 554 | + | |
563 | 555 | | |
564 | 556 | | |
565 | 557 | | |
| |||
769 | 761 | | |
770 | 762 | | |
771 | 763 | | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
772 | 784 | | |
773 | 785 | | |
774 | 786 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1730 | 1730 | | |
1731 | 1731 | | |
1732 | 1732 | | |
| 1733 | + | |
1733 | 1734 | | |
1734 | 1735 | | |
1735 | | - | |
1736 | | - | |
| 1736 | + | |
| 1737 | + | |
1737 | 1738 | | |
1738 | 1739 | | |
1739 | 1740 | | |
1740 | 1741 | | |
1741 | | - | |
| 1742 | + | |
1742 | 1743 | | |
1743 | 1744 | | |
1744 | 1745 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
576 | 577 | | |
577 | 578 | | |
578 | 579 | | |
| |||
1130 | 1131 | | |
1131 | 1132 | | |
1132 | 1133 | | |
| 1134 | + | |
1133 | 1135 | | |
1134 | 1136 | | |
1135 | 1137 | | |
| |||
1622 | 1624 | | |
1623 | 1625 | | |
1624 | 1626 | | |
1625 | | - | |
| 1627 | + | |
1626 | 1628 | | |
1627 | 1629 | | |
1628 | | - | |
1629 | | - | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
1630 | 1639 | | |
1631 | 1640 | | |
1632 | 1641 | | |
| |||
1847 | 1856 | | |
1848 | 1857 | | |
1849 | 1858 | | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1854 | 1864 | | |
1855 | 1865 | | |
1856 | 1866 | | |
| |||
1886 | 1896 | | |
1887 | 1897 | | |
1888 | 1898 | | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
1889 | 1905 | | |
1890 | 1906 | | |
1891 | 1907 | | |
| |||
2284 | 2300 | | |
2285 | 2301 | | |
2286 | 2302 | | |
| 2303 | + | |
| 2304 | + | |
| 2305 | + | |
| 2306 | + | |
| 2307 | + | |
| 2308 | + | |
| 2309 | + | |
| 2310 | + | |
| 2311 | + | |
| 2312 | + | |
2287 | 2313 | | |
2288 | 2314 | | |
2289 | 2315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
144 | 149 | | |
0 commit comments