authorgravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2022-11-13 13:47:42+11:00
committergravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2022-11-13 13:52:53+11:00
loga1b123bccbc2ae50442fcc1544b0da0595401038
treea7a1dab003721738d9321f1b45ac7fe277413f04
parentae0f12885bd0f6f436269a51634f56c3fe7fddc8

std.build: add setter for LibObjExeStep test runner path


1 files changed, 5 insertions(+), 0 deletions(-)

lib/std/build.zig+5
......@@ -2207,6 +2207,11 @@ pub const LibExeObjStep = struct {
22072207 self.filter = if (text) |t| self.builder.dupe(t) else null;
22082208 }
22092209
2210 pub fn setTestRunner(self: *LibExeObjStep, path: ?[]const u8) void {
2211 assert(self.kind == .@"test" or self.kind == .test_exe);
2212 self.test_runner = if (path) |p| self.builder.dupePath(p) else null;
2213 }
2214
22102215 /// Handy when you have many C/C++ source files and want them all to have the same flags.
22112216 pub fn addCSourceFiles(self: *LibExeObjStep, files: []const []const u8, flags: []const []const u8) void {
22122217 const c_source_files = self.builder.allocator.create(CSourceFiles) catch unreachable;