Skip to content

Commit 708099a

Browse files
committed
Only strip librustc_driver and libLLVM during x dist
The strip invocation can be quite slow (~1-2 seconds), and it is executed on every compiler bootstrap refresh when debuginfo is turned off, which can make most bootstrap commands quite slow.
1 parent f8e5660 commit 708099a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2143,6 +2143,12 @@ pub enum CargoMessage<'a> {
21432143
}
21442144

21452145
pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path) {
2146+
// Only perform stripping in dist builds, to save time (strip can be slow) during local
2147+
// development.
2148+
if builder.kind != Kind::Dist {
2149+
return;
2150+
}
2151+
21462152
// FIXME: to make things simpler for now, limit this to the host and target where we know
21472153
// `strip -g` is both available and will fix the issue, i.e. on a x64 linux host that is not
21482154
// cross-compiling. Expand this to other appropriate targets in the future.

0 commit comments

Comments
 (0)