diff options
| author | Peter Atashian <retep998@gmail.com> | 2016-05-31 16:14:34 -0400 |
|---|---|---|
| committer | Peter Atashian <retep998@gmail.com> | 2016-05-31 16:29:12 -0400 |
| commit | d34ad3c3b2c5ec3edb3bd33638f61436da4f2fe0 (patch) | |
| tree | 2daa345c34d2c1e0d03085f8b656759bd024d259 | |
| parent | 298730e7032cd55809423773da397cd5c7d827d4 (diff) | |
| download | rust-d34ad3c3b2c5ec3edb3bd33638f61436da4f2fe0.tar.gz rust-d34ad3c3b2c5ec3edb3bd33638f61436da4f2fe0.zip | |
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>
| -rw-r--r-- | src/librustc_trans/back/link.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 4640377cf86..6e5964d83c0 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -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(); } } |
