aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-02-02 20:12:28 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-02-02 20:43:01 -0700
commita17505c71109361b7b4bd13125871299de53e4e0 (patch)
tree666d088314d553e1cab96e037f31c28310b599a4 /src/Module.zig
parent996e61f8137ce468f2997b0220bae32c17ea3a00 (diff)
downloadzig-a17505c71109361b7b4bd13125871299de53e4e0.tar.gz
zig-a17505c71109361b7b4bd13125871299de53e4e0.zip
zig build: avoid using stdout for communication with runner
Pass the required lazy dependencies from the build runner to the parent process via a tmp file instead of stdout. I'll reproduce this comment to explain it: The `zig build` parent process needs a way to obtain results from the configuration phase of the child process. In the future, the make phase will be executed in a separate process than the configure phase, and we can then use stdout from the configuration phase for this purpose. However, currently, both phases are in the same process, and Run Step provides API for making the runned subprocesses inherit stdout and stderr which means these streams are not available for passing metadata back to the parent. Until make and configure phases are separated into different processes, the strategy is to choose a temporary file name ahead of time, and then read this file in the parent to obtain the results, in the case the child exits with code 3. This commit also extracts some common logic from the loop that rebuilds the build runner so that it does not run again when the build runner is rebuilt.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions