Propagate linker failure (#4728)
* Propagate linker failure * make sure we still write linker error --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
bee89b795d
commit
b35a52f337
3 files changed
+25
-8
No files matched your search
@@ -2,6 +2,7 @@ use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
env::{args, vars},
|
||||
path::PathBuf,
|
||||
process::ExitCode,
|
||||
};
|
||||
|
||||
/// The environment variable indicating where the args file is located.
|
||||
@@ -65,7 +66,7 @@ fn has_linking_args() -> bool {
|
||||
/// Run rustc directly, but output the result to a file.
|
||||
///
|
||||
/// <https://doc.rust-lang.org/cargo/reference/config.html#buildrustc>
|
||||
pub fn run_rustc() {
|
||||
pub fn run_rustc() -> ExitCode {
|
||||
// If we are being asked to link, delegate to the linker action.
|
||||
if has_linking_args() {
|
||||
return crate::link::LinkAction::from_env()
|
||||
|
||||
Reference in new issue
Block a user