aboutsummaryrefslogtreecommitdiff
path: root/test/tests.zig
diff options
context:
space:
mode:
authorJacob Young <jacobly0@users.noreply.github.com>2023-04-20 14:42:11 -0400
committerJacob Young <jacobly0@users.noreply.github.com>2023-04-21 16:36:31 -0400
commit871d29b1a4d9fdf6ac85efecd694def1ab4aee66 (patch)
tree52cc01fe3d2839dd4a89b881850a3ec420c95684 /test/tests.zig
parentee9ef86d89767b06ecd3921a4a73e975f471921f (diff)
downloadzig-871d29b1a4d9fdf6ac85efecd694def1ab4aee66.tar.gz
zig-871d29b1a4d9fdf6ac85efecd694def1ab4aee66.zip
std: add more missing windows libraries when running tests
Diffstat (limited to 'test/tests.zig')
-rw-r--r--test/tests.zig14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/tests.zig b/test/tests.zig
index b1d442b5c8..3202d19b3e 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -1039,11 +1039,17 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
},
});
compile_c.addIncludePath("lib"); // for zig.h
- if (test_target.link_libc == false and test_target.target.getOsTag() == .windows) {
- compile_c.subsystem = .Console;
- compile_c.linkSystemLibrary("kernel32");
- compile_c.linkSystemLibrary("ntdll");
+ if (test_target.target.getOsTag() == .windows) {
+ if (test_target.link_libc == false) {
+ compile_c.subsystem = .Console;
+ compile_c.linkSystemLibrary("kernel32");
+ compile_c.linkSystemLibrary("ntdll");
+ }
if (mem.eql(u8, options.name, "std")) {
+ if (test_target.link_libc == false) {
+ compile_c.linkSystemLibrary("shell32");
+ compile_c.linkSystemLibrary("advapi32");
+ }
compile_c.linkSystemLibrary("crypt32");
compile_c.linkSystemLibrary("ws2_32");
compile_c.linkSystemLibrary("ole32");