aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build
diff options
context:
space:
mode:
authorMatthew Lugg <mlugg@mlugg.co.uk>2025-06-20 10:28:38 +0100
committerGitHub <noreply@github.com>2025-06-20 10:28:38 +0100
commit75d0ec9c0476da61c6f32b3d386d8844faaeb1c5 (patch)
treea70b40d99686b54415ed1aa0c9fa6c6cb827321c /lib/std/Build
parent9e340b3005975e87563566a223d2f98e070f12cb (diff)
parent4a9e8b73aa9042c17d03d3de4d9070a913db2193 (diff)
downloadzig-75d0ec9c0476da61c6f32b3d386d8844faaeb1c5.tar.gz
zig-75d0ec9c0476da61c6f32b3d386d8844faaeb1c5.zip
Merge pull request #24227 from mlugg/misc-build-stuff
`std.Build`: more miscellaneous bits
Diffstat (limited to 'lib/std/Build')
-rw-r--r--lib/std/Build/Step/Run.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig
index aa3931ac8c..4b8dabc14e 100644
--- a/lib/std/Build/Step/Run.zig
+++ b/lib/std/Build/Step/Run.zig
@@ -204,11 +204,10 @@ pub fn setName(run: *Run, name: []const u8) void {
pub fn enableTestRunnerMode(run: *Run) void {
const b = run.step.owner;
- const arena = b.allocator;
run.stdio = .zig_test;
+ run.addPrefixedDirectoryArg("--cache-dir=", .{ .cwd_relative = b.cache_root.path orelse "." });
run.addArgs(&.{
- std.fmt.allocPrint(arena, "--seed=0x{x}", .{b.graph.random_seed}) catch @panic("OOM"),
- std.fmt.allocPrint(arena, "--cache-dir={s}", .{b.cache_root.path orelse ""}) catch @panic("OOM"),
+ b.fmt("--seed=0x{x}", .{b.graph.random_seed}),
"--listen=-",
});
}