zig/lib/std/Build/Step
Justus Klausecker be571f32c3 std.Build.Step.Run: Enable passing (generated) file content as args
Adds `addFileContentArg` and `addPrefixedFileContentArg` to pass the content
of a file with a lazy path as an argument to a `std.Build.Step.Run`.
This enables replicating shell `$()` / cmake `execute_process` with `OUTPUT_VARIABLE`
as an input to another `execute_process` in conjuction with `captureStdOut`/`captureStdErr`.

To also be able to replicate `$()` automatically trimming trailing newlines and cmake
`OUTPUT_STRIP_TRAILING_WHITESPACE`, this patch adds an `options` arg to those functions
which allows specifying the desired handling of surrounding whitespace.

The `options` arg also allows to specify a custom `basename` for the output. e.g.
to add a file extension (concrete use case: Zig `@import()` requires files to have a
`.zig`/`.zon` extension to recognize them as valid source files).
2025-09-19 17:38:40 -07:00
..
CheckFile.zig rework std.Io.Writer.Allocating to support runtime-known alignment 2025-08-30 00:48:50 -07:00
CheckObject.zig std.elf: change STV enum from u2 to u3 2025-09-04 01:16:23 +02:00
Compile.zig std.Io: delete GenericReader 2025-08-29 17:14:26 -07:00
ConfigHeader.zig rework std.Io.Writer.Allocating to support runtime-known alignment 2025-08-30 00:48:50 -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.Io: delete GenericReader 2025-08-29 17:14:26 -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 std.Build.Step.Run: Enable passing (generated) file content as args 2025-09-19 17:38:40 -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