diff options
| author | bors <bors@rust-lang.org> | 2016-05-31 18:49:48 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-05-31 18:49:48 -0700 |
| commit | ad5fbaf57c1f763935175cd217fedfc551d91aac (patch) | |
| tree | a761e6488582f2e9c90919f95d256624b1b3e9f7 | |
| parent | 601eb13dc4dd075f82f03c85bbf8a1fbadfe2d6e (diff) | |
| parent | d34ad3c3b2c5ec3edb3bd33638f61436da4f2fe0 (diff) | |
| download | rust-ad5fbaf57c1f763935175cd217fedfc551d91aac.tar.gz rust-ad5fbaf57c1f763935175cd217fedfc551d91aac.zip | |
Auto merge of #33979 - retep998:why-the-long-face, r=alexcrichton
Attempt to diagnose #33844 https://github.com/rust-lang/rust/issues/33844 is a spurious failure that causes builds to fail due to the linker command sometimes failing with error 206, which means that the command is too long. This PR makes rustc print out the linker arguments in that case so the reason for it being so long can be diagnosed and hopefully fixed. r? @alexcrichton
| -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(); } } |
