@@ -274,7 +274,7 @@ pub const LibCInstallation = struct {
274274 dev_null ,
275275 });
276276
277- const exec_res = std .ChildProcess .exec (.{
277+ const run_res = std .ChildProcess .run (.{
278278 .allocator = allocator ,
279279 .argv = argv .items ,
280280 .max_output_bytes = 1024 * 1024 ,
@@ -292,21 +292,21 @@ pub const LibCInstallation = struct {
292292 },
293293 };
294294 defer {
295- allocator .free (exec_res .stdout );
296- allocator .free (exec_res .stderr );
295+ allocator .free (run_res .stdout );
296+ allocator .free (run_res .stderr );
297297 }
298- switch (exec_res .term ) {
298+ switch (run_res .term ) {
299299 .Exited = > | code | if (code != 0 ) {
300- printVerboseInvocation (argv .items , null , args .verbose , exec_res .stderr );
300+ printVerboseInvocation (argv .items , null , args .verbose , run_res .stderr );
301301 return error .CCompilerExitCode ;
302302 },
303303 else = > {
304- printVerboseInvocation (argv .items , null , args .verbose , exec_res .stderr );
304+ printVerboseInvocation (argv .items , null , args .verbose , run_res .stderr );
305305 return error .CCompilerCrashed ;
306306 },
307307 }
308308
309- var it = std .mem .tokenizeAny (u8 , exec_res .stderr , "\n \r " );
309+ var it = std .mem .tokenizeAny (u8 , run_res .stderr , "\n \r " );
310310 var search_paths = std .ArrayList ([]const u8 ).init (allocator );
311311 defer search_paths .deinit ();
312312 while (it .next ()) | line | {
@@ -596,7 +596,7 @@ fn ccPrintFileName(args: CCPrintFileNameOptions) ![:0]u8 {
596596 try appendCcExe (& argv , skip_cc_env_var );
597597 try argv .append (arg1 );
598598
599- const exec_res = std .ChildProcess .exec (.{
599+ const run_res = std .ChildProcess .run (.{
600600 .allocator = allocator ,
601601 .argv = argv .items ,
602602 .max_output_bytes = 1024 * 1024 ,
@@ -611,21 +611,21 @@ fn ccPrintFileName(args: CCPrintFileNameOptions) ![:0]u8 {
611611 else = > return error .UnableToSpawnCCompiler ,
612612 };
613613 defer {
614- allocator .free (exec_res .stdout );
615- allocator .free (exec_res .stderr );
614+ allocator .free (run_res .stdout );
615+ allocator .free (run_res .stderr );
616616 }
617- switch (exec_res .term ) {
617+ switch (run_res .term ) {
618618 .Exited = > | code | if (code != 0 ) {
619- printVerboseInvocation (argv .items , args .search_basename , args .verbose , exec_res .stderr );
619+ printVerboseInvocation (argv .items , args .search_basename , args .verbose , run_res .stderr );
620620 return error .CCompilerExitCode ;
621621 },
622622 else = > {
623- printVerboseInvocation (argv .items , args .search_basename , args .verbose , exec_res .stderr );
623+ printVerboseInvocation (argv .items , args .search_basename , args .verbose , run_res .stderr );
624624 return error .CCompilerCrashed ;
625625 },
626626 }
627627
628- var it = std .mem .tokenizeAny (u8 , exec_res .stdout , "\n \r " );
628+ var it = std .mem .tokenizeAny (u8 , run_res .stdout , "\n \r " );
629629 const line = it .next () orelse return error .LibCRuntimeNotFound ;
630630 // When this command fails, it returns exit code 0 and duplicates the input file name.
631631 // So we detect failure by checking if the output matches exactly the input.
0 commit comments