Skip to content

Commit 65cc0ad

Browse files
committed
bootstrap: non-bootstrap windows split debuginfo
Temporarily, only enable split debuginfo on Windows if not building with the boostrap compiler as there is a bug that isn't fixed in the bootstrap compiler which would result in `thorin` being run on Windows. Signed-off-by: David Wood <david.wood@huawei.com>
1 parent b786345 commit 65cc0ad

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/bootstrap/builder.rs

+11-7
Original file line numberDiff line numberDiff line change
@@ -1365,14 +1365,18 @@ impl<'a> Builder<'a> {
13651365
},
13661366
);
13671367

1368-
if target.contains("linux") || target.contains("windows") {
1369-
rustflags.arg("-Zunstable-options");
1368+
// FIXME(davidtwco): #[cfg(not(bootstrap))] - #95612 needs to be in the bootstrap compiler
1369+
// for this conditional to be removed.
1370+
if !target.contains("windows") || compiler.stage >= 1 {
1371+
if target.contains("linux") || target.contains("windows") {
1372+
rustflags.arg("-Zunstable-options");
1373+
}
1374+
match self.config.rust_split_debuginfo {
1375+
SplitDebuginfo::Packed => rustflags.arg("-Csplit-debuginfo=packed"),
1376+
SplitDebuginfo::Unpacked => rustflags.arg("-Csplit-debuginfo=unpacked"),
1377+
SplitDebuginfo::Off => rustflags.arg("-Csplit-debuginfo=off"),
1378+
};
13701379
}
1371-
match self.config.rust_split_debuginfo {
1372-
SplitDebuginfo::Packed => rustflags.arg("-Csplit-debuginfo=packed"),
1373-
SplitDebuginfo::Unpacked => rustflags.arg("-Csplit-debuginfo=unpacked"),
1374-
SplitDebuginfo::Off => rustflags.arg("-Csplit-debuginfo=off"),
1375-
};
13761380

13771381
if self.config.cmd.bless() {
13781382
// Bless `expect!` tests.

0 commit comments

Comments
 (0)