aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-04-10 18:09:39 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-04-11 08:42:14 -0700
commit3c3cee2cfabc5d03bb83cf6cc6a8ed80f13ee1df (patch)
treeb440fbaf013ed472c39a60381928c0224e694f5c /lib/std/Build.zig
parentd5eab33fd23351a8606cb69a846b1b753b4c7c4a (diff)
downloadzig-3c3cee2cfabc5d03bb83cf6cc6a8ed80f13ee1df.tar.gz
zig-3c3cee2cfabc5d03bb83cf6cc6a8ed80f13ee1df.zip
fix build logic due to state mutations and break the API accordingly
* remove setName, setFilter, and setTestRunner. Please set these options directly when creating the CompileStep. * removed unused field * remove computeOutFileNames and inline the logic, making clear the goal of avoiding state mutations after the build step is created.
Diffstat (limited to 'lib/std/Build.zig')
-rw-r--r--lib/std/Build.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/Build.zig b/lib/std/Build.zig
index 5b974bb816..7faa7780b2 100644
--- a/lib/std/Build.zig
+++ b/lib/std/Build.zig
@@ -539,6 +539,8 @@ pub const TestOptions = struct {
optimize: std.builtin.Mode = .Debug,
version: ?std.builtin.Version = null,
max_rss: usize = 0,
+ filter: ?[]const u8 = null,
+ test_runner: ?[]const u8 = null,
};
pub fn addTest(b: *Build, options: TestOptions) *CompileStep {
@@ -549,6 +551,8 @@ pub fn addTest(b: *Build, options: TestOptions) *CompileStep {
.target = options.target,
.optimize = options.optimize,
.max_rss = options.max_rss,
+ .filter = options.filter,
+ .test_runner = options.test_runner,
});
}