Skip to content

Commit 48e56f1

Browse files
committed
panic=abort for tools
1 parent afbf061 commit 48e56f1

File tree

1 file changed

+13
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+13
-0
lines changed

src/bootstrap/src/core/build_steps/tool.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,19 @@ pub fn prepare_tool_cargo(
166166
}
167167
}
168168

169+
if compiler.stage != 0 {
170+
if path.ends_with("rls")
171+
|| path.ends_with("clippy")
172+
|| path.ends_with("miri")
173+
|| path.ends_with("rustfmt")
174+
|| path.ends_with("rustdoc")
175+
|| path.ends_with("rustdoc-tool")
176+
{
177+
cargo.rustflag("-Cpanic=abort");
178+
cargo.rustflag("-Cforce-unwind-tables=yes");
179+
}
180+
}
181+
169182
// clippy tests need to know about the stage sysroot. Set them consistently while building to
170183
// avoid rebuilding when running tests.
171184
cargo.env("SYSROOT", builder.sysroot(compiler));

0 commit comments

Comments
 (0)