]> git.lizzy.rs Git - rust.git/commitdiff
Only run dsymutil on OSX in debug builds
authorAlex Crichton <alex@alexcrichton.com>
Fri, 1 Nov 2013 18:55:06 +0000 (11:55 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 10 Nov 2013 21:58:11 +0000 (13:58 -0800)
When there are no debug symbols generated, then the program just prints an
annoying warning otherwise.

Closes #10198

src/librustc/back/link.rs

index 21268c132ba9eb0a1bec64515e7e1f4df9365666..d58358d239542e5400f0246480c0c3d28935f840 100644 (file)
@@ -956,8 +956,9 @@ pub fn link_binary(sess: Session,
         sess.abort_if_errors();
     }
 
-    // Clean up on Darwin
-    if sess.targ_cfg.os == abi::OsMacos {
+    // On OSX, debuggers needs this utility to get run to do some munging of the
+    // symbols
+    if sess.targ_cfg.os == abi::OsMacos && sess.opts.debuginfo {
         // FIXME (#9639): This needs to handle non-utf8 paths
         run::process_status("dsymutil", [output.as_str().unwrap().to_owned()]);
     }