Skip to content

Commit 9993e27

Browse files
committed
Auto merge of rust-lang#126494 - Kobzol:dont-strip-me-bro, r=<try>
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. Discussed [here](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Only.20strip.20LLVM.2Frustc.20in.20the.20dist.20profile). r? `@lqd`
2 parents f8e5660 + 708099a commit 9993e27

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)