diff options
Diffstat (limited to 'lib/std/build.zig')
| -rw-r--r-- | lib/std/build.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index 4d2fbabcae..9bac20df4b 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1064,6 +1064,9 @@ pub const LibExeObjStep = struct { /// Uses system QEMU installation to run cross compiled foreign architecture build artifacts. enable_qemu: bool = false, + /// Uses system Wasmtime installation to run cross compiled wasm/wasi build artifacts. + enable_wasmtime: bool = false, + /// After following the steps in https://github.com/ziglang/zig/wiki/Updating-libc#glibc, /// this will be the directory $glibc-build-dir/install/glibcs /// Given the example of the aarch64 target, this is the directory @@ -1863,6 +1866,11 @@ pub const LibExeObjStep = struct { try zig_args.append(bin_name); try zig_args.append("--test-cmd-bin"); }, + .wasmtime => |bin_name| if (self.enable_wasmtime) { + try zig_args.append("--test-cmd"); + try zig_args.append(bin_name); + try zig_args.append("--test-cmd-bin"); + }, } for (self.packages.toSliceConst()) |pkg| { zig_args.append("--pkg-begin") catch unreachable; |
