diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2024-03-09 17:47:56 -0800 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2024-03-11 05:06:17 -0700 |
| commit | c32e0d3000f4ee539c00577b75e18c683e84f2c4 (patch) | |
| tree | f842da57cacd61decee1cdd400dbe4db64eff8f3 /src/Compilation.zig | |
| parent | b16890e6ddb451301f09029e3b0649168dc53918 (diff) | |
| download | zig-c32e0d3000f4ee539c00577b75e18c683e84f2c4.tar.gz zig-c32e0d3000f4ee539c00577b75e18c683e84f2c4.zip | |
Fix progress when multiple zig rc child processes are building resinator
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 3f312e9956..2fce786856 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -5042,12 +5042,18 @@ fn spawnZigRc( }, .progress => { node_name.clearRetainingCapacity(); - if (body.len > 0) { + // <resinator> is a special string that indicates that the child + // process has reached resinator's main function + if (std.mem.eql(u8, body, "<resinator>")) { + child_progress_node.setName(src_basename); + } + // Ignore 0-length strings since if multiple zig rc commands + // are executed at the same time, only one will send progress strings + // while the other(s) will send empty strings. + else if (body.len > 0) { try node_name.appendSlice(arena, "build 'zig rc'... "); try node_name.appendSlice(arena, body); child_progress_node.setName(node_name.items); - } else { - child_progress_node.setName(src_basename); } }, else => {}, // ignore other messages |
