| ... | @@ -1039,11 +1039,17 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { | ... | @@ -1039,11 +1039,17 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 1039 | }, | 1039 | }, |
| 1040 | }); | 1040 | }); |
| 1041 | compile_c.addIncludePath("lib"); // for zig.h | 1041 | compile_c.addIncludePath("lib"); // for zig.h |
| 1042 | if (test_target.link_libc == false and test_target.target.getOsTag() == .windows) { | 1042 | if (test_target.target.getOsTag() == .windows) { |
| 1043 | compile_c.subsystem = .Console; | 1043 | if (test_target.link_libc == false) { |
| 1044 | compile_c.linkSystemLibrary("kernel32"); | 1044 | compile_c.subsystem = .Console; |
| 1045 | compile_c.linkSystemLibrary("ntdll"); | 1045 | compile_c.linkSystemLibrary("kernel32"); |
| | 1046 | compile_c.linkSystemLibrary("ntdll"); |
| | 1047 | } |
| 1046 | if (mem.eql(u8, options.name, "std")) { | 1048 | if (mem.eql(u8, options.name, "std")) { |
| | 1049 | if (test_target.link_libc == false) { |
| | 1050 | compile_c.linkSystemLibrary("shell32"); |
| | 1051 | compile_c.linkSystemLibrary("advapi32"); |
| | 1052 | } |
| 1047 | compile_c.linkSystemLibrary("crypt32"); | 1053 | compile_c.linkSystemLibrary("crypt32"); |
| 1048 | compile_c.linkSystemLibrary("ws2_32"); | 1054 | compile_c.linkSystemLibrary("ws2_32"); |
| 1049 | compile_c.linkSystemLibrary("ole32"); | 1055 | compile_c.linkSystemLibrary("ole32"); |