Skip to content

Commit d34ad3c

Browse files
committed
Print linker arguments if calling the linker fails
Needed to diagnose #33844 Signed-off-by: Peter Atashian <[email protected]>
1 parent 298730e commit d34ad3c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc_trans/back/link.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,11 @@ fn link_natively(sess: &Session,
692692
info!("linker stdout:\n{}", escape_string(&prog.stdout[..]));
693693
},
694694
Err(e) => {
695-
sess.fatal(&format!("could not exec the linker `{}`: {}", pname, e));
695+
// Trying to diagnose https://github.com/rust-lang/rust/issues/33844
696+
sess.struct_err(&format!("could not exec the linker `{}`: {}", pname, e))
697+
.note(&format!("{:?}", &cmd))
698+
.emit();
699+
sess.abort_if_errors();
696700
}
697701
}
698702

0 commit comments

Comments
 (0)