summary refs log tree commit diff
path: root/src/bootstrap/bin
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-05-05 22:15:42 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-05-24 11:49:30 +0300
commit28405cabd50181afa6eccfd7f2ee8eb363d35594 (patch)
tree16d1e6c2276d4749946e6c83cca74ed5ac0a31ee /src/bootstrap/bin
parent46805805abe58c287fa16963f897fd09d5d97467 (diff)
downloadrust-28405cabd50181afa6eccfd7f2ee8eb363d35594.tar.gz
rust-28405cabd50181afa6eccfd7f2ee8eb363d35594.zip
rustbuild: Simplify debuginfo configuration
Diffstat (limited to 'src/bootstrap/bin')
-rw-r--r--src/bootstrap/bin/rustc.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs
index 821c37dc235..d51961c65b7 100644
--- a/src/bootstrap/bin/rustc.rs
+++ b/src/bootstrap/bin/rustc.rs
@@ -102,6 +102,10 @@ fn main() {
 
     cmd.env("RUSTC_BREAK_ON_ICE", "1");
 
+    if let Ok(debuginfo_level) = env::var("RUSTC_DEBUGINFO_LEVEL") {
+        cmd.arg(format!("-Cdebuginfo={}", debuginfo_level));
+    }
+
     if let Some(target) = target {
         // The stage0 compiler has a special sysroot distinct from what we
         // actually downloaded, so we just always pass the `--sysroot` option.
@@ -169,11 +173,6 @@ fn main() {
 
         // Set various options from config.toml to configure how we're building
         // code.
-        if env::var("RUSTC_DEBUGINFO") == Ok("true".to_string()) {
-            cmd.arg("-g");
-        } else if env::var("RUSTC_DEBUGINFO_LINES") == Ok("true".to_string()) {
-            cmd.arg("-Cdebuginfo=1");
-        }
         let debug_assertions = match env::var("RUSTC_DEBUG_ASSERTIONS") {
             Ok(s) => if s == "true" { "y" } else { "n" },
             Err(..) => "n",