populateGeneratedPaths
Function parameters
Parameters
- arena:std.mem.Allocator
- output_placeholders:[]const IndexedOutput
- captured_stdout:?*Output
- captured_stderr:?*Output
- cache_root:Build.Cache.Directory
- digest:*const Build.Cache.HexDigest
Type definitions in this namespace
Types
Functions in this namespace
Functions
- addOutputFileArg
- Provides a file path as a command line argument to the command being run.
- addPrefixedOutputFileArg
- Provides a file path as a command line argument to the command being run.
- addFileArg
- Appends an input file to the command line arguments.
- addPrefixedFileArg
- Appends an input file to the command line arguments prepended with a string.
- addOutputDirectoryArg
- Provides a directory path as a command line argument to the command being run.
- addPrefixedOutputDirectoryArg
- Provides a directory path as a command line argument to the command being run.
- addDepFileOutputArg
- Add a path argument to a dep file (.d) for the child process to write its
- addPrefixedDepFileOutputArg
- Add a prefixed path argument to a dep file (.d) for the child process to
- expectStdErrEqual
- Adds a check for exact stderr match.
- expectStdOutEqual
- Adds a check for exact stdout match as well as a check for exit code 0, if
- addFileInput
- Adds an additional input files that, when modified, indicates that this Run
= .run
Values
- base_id
- = .run
Source
Implementation
fn populateGeneratedPaths(
arena: std.mem.Allocator,
output_placeholders: []const IndexedOutput,
captured_stdout: ?*Output,
captured_stderr: ?*Output,
cache_root: Build.Cache.Directory,
digest: *const Build.Cache.HexDigest,
) !void {
for (output_placeholders) |placeholder| {
placeholder.output.generated_file.path = try cache_root.join(arena, &.{
"o", digest, placeholder.output.basename,
});
}
if (captured_stdout) |output| {
output.generated_file.path = try cache_root.join(arena, &.{
"o", digest, output.basename,
});
}
if (captured_stderr) |output| {
output.generated_file.path = try cache_root.join(arena, &.{
"o", digest, output.basename,
});
}
}