zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3e1e625814165d9d9282f3cd89bc117cf1b6d61c (tree)
parent 5464392e116b590cc9c2b662e967bc544b7d0a64
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Tue, 14 Apr 2026 14:42:37 +0200

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.

Diffstat:
Mtest/tests.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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.