mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 08:33:06 +00:00
CLI: quality of life enhancement for windows CBE behavior tests
When testing with ``` stage4/bin/zig test ../test/behavior.zig -I../test -ofmt=c -target x86_64-windows ``` previously, one would see this message: ``` error: lld-link: subsystem must be defined ``` Now, `--subsystem console` as well as `-lntdll -lkernel32` are on the `zig run` line, producing a binary.
This commit is contained in:
parent
bf316e5506
commit
3f693cf5d5
10
src/main.zig
10
src/main.zig
@ -3059,7 +3059,15 @@ fn buildOutputType(
|
||||
try test_exec_args.appendSlice(&.{ "-I", p });
|
||||
}
|
||||
|
||||
if (link_libc) try test_exec_args.append("-lc");
|
||||
if (link_libc) {
|
||||
try test_exec_args.append("-lc");
|
||||
} else if (target_info.target.os.tag == .windows) {
|
||||
try test_exec_args.appendSlice(&.{
|
||||
"--subsystem", "console",
|
||||
"-lkernel32", "-lntdll",
|
||||
});
|
||||
}
|
||||
|
||||
if (!mem.eql(u8, target_arch_os_abi, "native")) {
|
||||
try test_exec_args.append("-target");
|
||||
try test_exec_args.append(target_arch_os_abi);
|
||||
|
Loading…
Reference in New Issue
Block a user