Only run dsymutil on OSX in debug builds

When there are no debug symbols generated, then the program just prints an
annoying warning otherwise.

Closes #10198
This commit is contained in:
Alex Crichton 2013-11-01 11:55:06 -07:00
parent b5e602ac56
commit 64afa4ea22

View 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()]);
}