Skip to content

Commit

Permalink
Print linker arguments if calling the linker fails
Browse files Browse the repository at this point in the history
Needed to diagnose #33844

Signed-off-by: Peter Atashian <retep998@gmail.com>
  • Loading branch information
retep998 committed May 31, 2016
1 parent 298730e commit d34ad3c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc_trans/back/link.rs
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit d34ad3c

Please sign in to comment.