diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-04-17 17:17:11 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-04-20 13:17:46 -0700 |
| commit | 275549baa5bd27f0d01bf8a04f562bd90584eaf9 (patch) | |
| tree | 0e92f4fa381df27c8d3e0e7da8ec433e698000eb | |
| parent | 1364ffc1277960ff47cd37125b16f28526b35af5 (diff) | |
| download | rust-275549baa5bd27f0d01bf8a04f562bd90584eaf9.tar.gz rust-275549baa5bd27f0d01bf8a04f562bd90584eaf9.zip | |
Disable debuginfo when compiling tools
Currently the Cargo binary has jumped from 14M to 34M on the beta channel, which appears to be due to the fact that we're compiling tools with debug information inside them. This additionally means that the `rls` binary is 62M right now! This wasn't an intentional change, so be sure to disable debuginfo when compiling tools as it's just intended for the standard library and compile for now.
| -rw-r--r-- | src/bootstrap/lib.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs index 8fb078c2a88..ec56b54bccc 100644 --- a/src/bootstrap/lib.rs +++ b/src/bootstrap/lib.rs @@ -461,8 +461,6 @@ impl Build { .env("RUSTC", self.out.join("bootstrap/debug/rustc")) .env("RUSTC_REAL", self.compiler_path(compiler)) .env("RUSTC_STAGE", stage.to_string()) - .env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()) - .env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()) .env("RUSTC_CODEGEN_UNITS", self.config.rust_codegen_units.to_string()) .env("RUSTC_DEBUG_ASSERTIONS", @@ -474,6 +472,13 @@ impl Build { .env("RUSTDOC_REAL", self.rustdoc(compiler)) .env("RUSTC_FLAGS", self.rustc_flags(target).join(" ")); + // Tools don't get debuginfo right now, e.g. cargo and rls don't get + // compiled with debuginfo. + if mode != Mode::Tool { + cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()) + .env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()); + } + // Enable usage of unstable features cargo.env("RUSTC_BOOTSTRAP", "1"); self.add_rust_test_threads(&mut cargo); |
