Skip to content

Commit

Permalink
Auto merge of #33979 - retep998:why-the-long-face, r=alexcrichton
Browse files Browse the repository at this point in the history
Attempt to diagnose #33844

#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
  • Loading branch information
bors committed Jun 1, 2016
2 parents 601eb13 + d34ad3c commit ad5fbaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/librustc_trans/back/link.rs
Original file line number Diff line number Diff line change
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 ad5fbaf

Please sign in to comment.