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.
This commit is contained in:
Alex Rønne Petersen
2026-04-14 14:42:37 +02:00
parent 5464392e11
commit 3e1e625814
+1 -1
View File
@@ -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.