diff options
Diffstat (limited to 'src/bootstrap/builder.rs')
| -rw-r--r-- | src/bootstrap/builder.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 848fb9eade9..131d2566af5 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1676,7 +1676,15 @@ impl<'a> Builder<'a> { self.config.rust_debuginfo_level_tools } }; - cargo.env(profile_var("DEBUG"), debuginfo_level.to_string()); + if debuginfo_level == 1 { + // Use less debuginfo than the default to save on disk space. + cargo.env(profile_var("DEBUG"), "line-tables-only"); + } else { + cargo.env(profile_var("DEBUG"), debuginfo_level.to_string()); + }; + if self.cc[&target].args().iter().any(|arg| arg == "-gz") { + rustflags.arg("-Clink-arg=-gz"); + } cargo.env( profile_var("DEBUG_ASSERTIONS"), if mode == Mode::Std { |
