]> git.proxmox.com Git - cargo.git/commitdiff
Re-enable passing -g to rustc
authorAlex Crichton <alex@alexcrichton.com>
Wed, 3 Sep 2014 18:54:47 +0000 (11:54 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 3 Sep 2014 18:54:47 +0000 (11:54 -0700)
Now that there is a way to disable debuginfo for a build, we can go back to
passing it by default. Any bugs in debuginfo will get weeded out by specifying
`debug = false` in the profile.

src/cargo/ops/cargo_rustc/mod.rs

index 8d342fa7d78a319f4440eb6e66dd4d140c6f0f41..a4d1c60af2b2948804eb2ffd54a3c79c3e3e63ec 100644 (file)
@@ -332,12 +332,9 @@ fn build_base_args(cx: &Context, mut cmd: ProcessBuilder,
         cmd = cmd.arg("--opt-level").arg(profile.get_opt_level().to_string());
     }
 
-    // Right now -g is a little buggy, so we're not passing -g just yet
-    // if profile.get_debug() {
-    //     into.push("-g".to_string());
-    // }
-
-    if !profile.get_debug() {
+    if profile.get_debug() {
+        cmd = cmd.arg("-g");
+    } else {
         cmd = cmd.args(["--cfg", "ndebug"]);
     }