Print linker arguments if calling the linker fails
Needed to diagnose https://github.com/rust-lang/rust/issues/33844 Signed-off-by: Peter Atashian <retep998@gmail.com>
This commit is contained in:
parent
298730e703
commit
d34ad3c3b2
@ -692,7 +692,11 @@ fn link_natively(sess: &Session,
|
||||
info!("linker stdout:\n{}", escape_string(&prog.stdout[..]));
|
||||
},
|
||||
Err(e) => {
|
||||
sess.fatal(&format!("could not exec the linker `{}`: {}", pname, e));
|
||||
// Trying to diagnose https://github.com/rust-lang/rust/issues/33844
|
||||
sess.struct_err(&format!("could not exec the linker `{}`: {}", pname, e))
|
||||
.note(&format!("{:?}", &cmd))
|
||||
.emit();
|
||||
sess.abort_if_errors();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user