File tree Expand file tree Collapse file tree 4 files changed +5
-11
lines changed Expand file tree Collapse file tree 4 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,9 @@ fn main() {
116116 }
117117 _ => Command :: new ( rustc_driver) ,
118118 } ;
119+
120+ cmd. arg ( "-Zon-broken-pipe=kill" ) ;
121+
119122 cmd. args ( & args) . env ( dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
120123
121124 if let Some ( crate_name) = crate_name {
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ fn main() {
4242 }
4343 }
4444
45+ cmd. arg ( "-Zon-broken-pipe=kill" ) ;
46+
4547 cmd. args ( & args) ;
4648 cmd. env ( dylib_path_var ( ) , env:: join_paths ( & dylib_path) . unwrap ( ) ) ;
4749
Original file line number Diff line number Diff line change @@ -1053,10 +1053,6 @@ pub fn rustc_cargo(
10531053
10541054 cargo. rustdocflag ( "-Zcrate-attr=warn(rust_2018_idioms)" ) ;
10551055
1056- // If the rustc output is piped to e.g. `head -n1` we want the process to be
1057- // killed, rather than having an error bubble up and cause a panic.
1058- cargo. rustflag ( "-Zon-broken-pipe=kill" ) ;
1059-
10601056 if builder. config . llvm_enzyme {
10611057 cargo. rustflag ( "-l" ) . rustflag ( "Enzyme-19" ) ;
10621058 }
Original file line number Diff line number Diff line change @@ -209,13 +209,6 @@ pub fn prepare_tool_cargo(
209209 // See https://github.com/rust-lang/rust/issues/116538
210210 cargo. rustflag ( "-Zunstable-options" ) ;
211211
212- // `-Zon-broken-pipe=kill` breaks cargo tests
213- if !path. ends_with ( "cargo" ) {
214- // If the output is piped to e.g. `head -n1` we want the process to be killed,
215- // rather than having an error bubble up and cause a panic.
216- cargo. rustflag ( "-Zon-broken-pipe=kill" ) ;
217- }
218-
219212 cargo
220213}
221214
You can’t perform that action at this time.
0 commit comments