aboutsummaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-14 02:53:05 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-03-15 10:48:12 -0700
commit9580fbcf3596a39ba4c7d7af2f3a1df0e0abb746 (patch)
treecbec640f8c4cc29508b33b01b10cf85851233ba4 /build.zig
parent1fa1484288dc7431f73facb8c423b71670d6914e (diff)
downloadzig-9580fbcf3596a39ba4c7d7af2f3a1df0e0abb746.tar.gz
zig-9580fbcf3596a39ba4c7d7af2f3a1df0e0abb746.zip
build system: capture stderr and report it later
Instead of dumping directly to stderr. This prevents processes running simultaneously from racing their stderr against each other. For now it only reports at the end, but an improvement would be to report as soon as a failed step occurs.
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig5
1 files changed, 1 insertions, 4 deletions
diff --git a/build.zig b/build.zig
index 12e5d014e2..797c980739 100644
--- a/build.zig
+++ b/build.zig
@@ -676,10 +676,7 @@ fn addCxxKnownPath(
) !void {
if (!std.process.can_spawn)
return error.RequiredLibraryNotFound;
- const path_padded = try b.exec(&[_][]const u8{
- ctx.cxx_compiler,
- b.fmt("-print-file-name={s}", .{objname}),
- });
+ const path_padded = b.exec(&.{ ctx.cxx_compiler, b.fmt("-print-file-name={s}", .{objname}) });
var tokenizer = mem.tokenize(u8, path_padded, "\r\n");
const path_unpadded = tokenizer.next().?;
if (mem.eql(u8, path_unpadded, objname)) {