Skip to content

Commit cff9c67

Browse files
committed
Output linker errors, when linking fails
1 parent 8124846 commit cff9c67

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/comp/back/link.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,11 @@ fn link_binary(sess: session::session,
596596

597597
log #fmt("gcc link args: %s", str::connect(gcc_args, " "));
598598
// We run 'gcc' here
599-
let err_code = run::run_program(prog, gcc_args);
600-
if 0 != err_code {
601-
sess.err(#fmt["linking with gcc failed with code %d", err_code]);
599+
let prog = run::program_output(prog, gcc_args);
600+
if 0 != prog.status {
601+
sess.err(#fmt["linking with gcc failed with code %d", prog.status]);
602602
sess.note(#fmt["gcc arguments: %s", str::connect(gcc_args, " ")]);
603+
sess.note(prog.err + prog.out);
603604
sess.abort_if_errors();
604605
}
605606
// Clean up on Darwin

0 commit comments

Comments
 (0)