Skip to content

Commit 64afa4e

Browse files
committed
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 rust-lang#10198
1 parent b5e602a commit 64afa4e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustc/back/link.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -956,8 +956,9 @@ pub fn link_binary(sess: Session,
956956
sess.abort_if_errors();
957957
}
958958

959-
// Clean up on Darwin
960-
if sess.targ_cfg.os == abi::OsMacos {
959+
// On OSX, debuggers needs this utility to get run to do some munging of the
960+
// symbols
961+
if sess.targ_cfg.os == abi::OsMacos && sess.opts.debuginfo {
961962
// FIXME (#9639): This needs to handle non-utf8 paths
962963
run::process_status("dsymutil", [output.as_str().unwrap().to_owned()]);
963964
}

0 commit comments

Comments
 (0)