mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std: move child process APIs to std.Io
this gets the build runner compiling again on linux this work is incomplete; it only moves code around so that environment variables can be wrangled properly. a future commit will need to audit the cancelation and error handling of this moved logic.
This commit is contained in:
@@ -747,7 +747,7 @@ fn runPkgConfig(compile: *Compile, lib_name: []const u8) !PkgConfigResult {
|
||||
pkg_name,
|
||||
"--cflags",
|
||||
"--libs",
|
||||
}, &code, .Ignore)) |stdout| stdout else |err| switch (err) {
|
||||
}, &code, .ignore)) |stdout| stdout else |err| switch (err) {
|
||||
error.ProcessTerminated => return error.PkgConfigCrashed,
|
||||
error.ExecNotSupported => return error.PkgConfigFailed,
|
||||
error.ExitCodeFailure => return error.PkgConfigFailed,
|
||||
@@ -1847,7 +1847,7 @@ pub fn doAtomicSymLinks(
|
||||
|
||||
fn execPkgConfigList(b: *std.Build, out_code: *u8) (PkgConfigError || RunError)![]const PkgConfigPkg {
|
||||
const pkg_config_exe = b.graph.env_map.get("PKG_CONFIG") orelse "pkg-config";
|
||||
const stdout = try b.runAllowFail(&[_][]const u8{ pkg_config_exe, "--list-all" }, out_code, .Ignore);
|
||||
const stdout = try b.runAllowFail(&[_][]const u8{ pkg_config_exe, "--list-all" }, out_code, .ignore);
|
||||
var list = std.array_list.Managed(PkgConfigPkg).init(b.allocator);
|
||||
errdefer list.deinit();
|
||||
var line_it = mem.tokenizeAny(u8, stdout, "\r\n");
|
||||
|
||||
Reference in New Issue
Block a user