Skip to content

Commit e53407e

Browse files
committed
Rustbuild: enable -Zsplit-metadata for stage != 0
1 parent 7ec3b8d commit e53407e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/src/core/builder.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1484,6 +1484,12 @@ impl<'a> Builder<'a> {
14841484
hostflags.arg("-Zunstable-options");
14851485
hostflags.arg("--check-cfg=cfg(bootstrap)");
14861486

1487+
// cfg(bootstrap) unconditionally pass this once the bootstrap compiler understands it
1488+
if stage != 0 {
1489+
// FIXME remove once cargo enables this by default
1490+
rustflags.arg("-Zsplit-metadata");
1491+
}
1492+
14871493
// FIXME: It might be better to use the same value for both `RUSTFLAGS` and `RUSTDOCFLAGS`,
14881494
// but this breaks CI. At the very least, stage0 `rustdoc` needs `--cfg bootstrap`. See
14891495
// #71458.

0 commit comments

Comments
 (0)