authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-07-29 23:06:39-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-08-01 13:47:29-07:00
log9c84b5cc18b6f78d1eec25432c3cd2988edb83ed
tree62c83754fd9177337bed37f64eb7891d06ea8fa2
parent12d0c9a2fc1220ec5cba62f1923c502cd5607bf4

build.zig: fix -Dskip-non-native

now it actually does what it says on the tin

1 files changed, 1 insertions(+), 5 deletions(-)

test/tests.zig+1-5
...@@ -992,11 +992,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {...@@ -992,11 +992,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
992 const step = b.step(b.fmt("test-{s}", .{options.name}), options.desc);992 const step = b.step(b.fmt("test-{s}", .{options.name}), options.desc);
993993
994 for (test_targets) |test_target| {994 for (test_targets) |test_target| {
995 const is_native = test_target.target.isNative() or995 if (options.skip_non_native and !test_target.target.isNative())
996 (test_target.target.os_tag == builtin.os.tag and
997 test_target.target.cpu_arch == builtin.cpu.arch);
998
999 if (options.skip_non_native and !is_native)
1000 continue;996 continue;
1001997
1002 const resolved_target = b.resolveTargetQuery(test_target.target);998 const resolved_target = b.resolveTargetQuery(test_target.target);