From 3e1e625814165d9d9282f3cd89bc117cf1b6d61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Tue, 14 Apr 2026 14:42:37 +0200 Subject: [PATCH] test: handle -Dskip-libc correctly for module tests For a test target with link_libc = null, we need to skip it if we would implicitly link libc because the target requires it or because we don't yet have a syscall layer for it. --- test/tests.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests.zig b/test/tests.zig index fea928652d76472e08735494be33a6a8ad4e77b5..9887b0f024894db00f014ccbf7de389dc1b31520 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -2531,7 +2531,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { } else continue; } - if (options.skip_libc and test_target.link_libc == true) + if (options.skip_libc and (test_target.link_libc == true or std.os.targetRequiresLibC(target))) continue; // We can't provide MSVC libc when cross-compiling. -- 2.54.0