diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig index e56f1ba07e..ddccd02b6d 100644 --- a/src/main.zig +++ b/src/main.zig @@ -420,6 +420,7 @@ const usage_build_generic = \\ --test-cmd [arg] Specify test execution command one arg at a time \\ --test-cmd-bin Appends test binary path to test cmd args \\ --test-evented-io Runs the test in evented I/O mode + \\ --test-no-exec Compiles test binary without running it \\ \\Debug Options (Zig Compiler Development): \\ -ftime-report Print timing diagnostics @@ -603,6 +604,7 @@ fn buildOutputType( var linker_nxcompat = false; var linker_dynamicbase = false; var test_evented_io = false; + var test_no_exec = false; var stack_size_override: ?u64 = null; var image_base_override: ?u64 = null; var use_llvm: ?bool = null; @@ -938,6 +940,8 @@ fn buildOutputType( try test_exec_args.append(null); } else if (mem.eql(u8, arg, "--test-evented-io")) { test_evented_io = true; + } else if (mem.eql(u8, arg, "--test-no-exec")) { + test_no_exec = true; } else if (mem.eql(u8, arg, "--watch")) { watch = true; } else if (mem.eql(u8, arg, "-ftime-report")) { @@ -2167,7 +2171,8 @@ fn buildOutputType( } const run_or_test = switch (arg_mode) { - .run, .zig_test => true, + .run => true, + .zig_test => !test_no_exec, else => false, }; if (run_or_test) { |
