提交 cff9c676 编写于 作者: M Marijn Haverbeke

Output linker errors, when linking fails

上级 8124846b
......@@ -596,10 +596,11 @@ fn rmext(filename: str) -> str {
log #fmt("gcc link args: %s", str::connect(gcc_args, " "));
// We run 'gcc' here
let err_code = run::run_program(prog, gcc_args);
if 0 != err_code {
sess.err(#fmt["linking with gcc failed with code %d", err_code]);
let prog = run::program_output(prog, gcc_args);
if 0 != prog.status {
sess.err(#fmt["linking with gcc failed with code %d", prog.status]);
sess.note(#fmt["gcc arguments: %s", str::connect(gcc_args, " ")]);
sess.note(prog.err + prog.out);
sess.abort_if_errors();
}
// Clean up on Darwin
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册