Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7a2bff7

Browse files
committedDec 14, 2017
Do not produce debuginfo for tools
1 parent 1ba46dc commit 7a2bff7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎src/bootstrap/builder.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,13 @@ impl<'a> Builder<'a> {
495495
if let Some(target_linker) = self.build.linker(target) {
496496
cargo.env("RUSTC_TARGET_LINKER", target_linker);
497497
}
498-
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string())
499-
.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
500498

501499
if mode != Mode::Tool {
500+
// Tools don't get debuginfo right now, e.g. cargo and rls don't
501+
// get compiled with debuginfo.
502+
// Adding debuginfo increases their sizes by a factor of 3-4.
503+
cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string());
504+
cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string());
502505
cargo.env("RUSTC_FORCE_UNSTABLE", "1");
503506

504507
// Currently the compiler depends on crates from crates.io, and

0 commit comments

Comments
 (0)
Please sign in to comment.