authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-04-20 14:42:11-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-04-21 16:36:31-04:00
log871d29b1a4d9fdf6ac85efecd694def1ab4aee66
tree52cc01fe3d2839dd4a89b881850a3ec420c95684
parentee9ef86d89767b06ecd3921a4a73e975f471921f

std: add more missing windows libraries when running tests


1 files changed, 10 insertions(+), 4 deletions(-)

test/tests.zig+10-4
...@@ -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.h1041 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");