diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-14 02:53:05 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-03-15 10:48:12 -0700 |
| commit | 9580fbcf3596a39ba4c7d7af2f3a1df0e0abb746 (patch) | |
| tree | cbec640f8c4cc29508b33b01b10cf85851233ba4 /lib/std/Build/Step.zig | |
| parent | 1fa1484288dc7431f73facb8c423b71670d6914e (diff) | |
| download | zig-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 'lib/std/Build/Step.zig')
| -rw-r--r-- | lib/std/Build/Step.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/Build/Step.zig b/lib/std/Build/Step.zig index 1226c78c73..44998f4a44 100644 --- a/lib/std/Build/Step.zig +++ b/lib/std/Build/Step.zig @@ -9,6 +9,7 @@ state: State, /// Populated only if state is success. result: struct { err_code: anyerror, + stderr: []u8, }, pub const State = enum { @@ -78,7 +79,10 @@ pub fn init( .dependencies = std.ArrayList(*Step).init(allocator), .dependants = .{}, .state = .precheck_unstarted, - .result = undefined, + .result = .{ + .err_code = undefined, + .stderr = &.{}, + }, }; } |
