zig/lib/std/Build/Step
Ian Johnson d4df65e355 std.Build.Step.Compile: fix race condition in args file creation
Fixes #23993

Previously, if multiple build processes tried to create the same args file, there was a race condition with the use of the non-atomic `writeFile` function which could cause a spawned compiler to read an empty or incomplete args file. This commit avoids the race condition by first writing to a temporary file with a random path and renaming it to the desired path.
2025-08-26 12:02:50 +01:00
..
CheckFile.zig make zig compiler processes live across rebuilds 2024-07-14 19:51:16 -07:00
CheckObject.zig std.ArrayList: make unmanaged the default 2025-08-11 15:52:49 -07:00
Compile.zig std.Build.Step.Compile: fix race condition in args file creation 2025-08-26 12:02:50 +01:00
ConfigHeader.zig std.io.Writer.Allocating: rename getWritten() to written() 2025-08-13 01:43:52 -07:00
Fail.zig make zig compiler processes live across rebuilds 2024-07-14 19:51:16 -07:00
Fmt.zig Replace deprecated default initializations with decl literals 2024-09-12 16:01:23 +01:00
InstallArtifact.zig std.fmt: breaking API changes 2025-07-07 22:43:51 -07:00
InstallDir.zig std.fmt: breaking API changes 2025-07-07 22:43:51 -07:00
InstallFile.zig Build: add install commands to --verbose output 2025-06-19 11:45:06 -04:00
ObjCopy.zig std.ArrayList: make unmanaged the default 2025-08-11 15:52:49 -07:00
Options.zig build system: replace fuzzing UI with build UI, add time report 2025-08-01 23:48:21 +01:00
RemoveDir.zig make zig compiler processes live across rebuilds 2024-07-14 19:51:16 -07:00
Run.zig Build.Step.Run: fix missing stdin buffer and flush 2025-08-16 15:43:48 -07:00
TranslateC.zig std.Build.Step.TranslateC: forward --cache-dir and --global-cache-dir flags 2025-08-26 03:54:00 +00:00
UpdateSourceFiles.zig std.fmt: breaking API changes 2025-07-07 22:43:51 -07:00
WriteFile.zig std.fmt: breaking API changes 2025-07-07 22:43:51 -07:00