mirror of
https://github.com/ziglang/zig.git
synced 2025-12-21 21:53:08 +00:00
build.zig: fix -Dskip-non-native
now it actually does what it says on the tin
This commit is contained in:
parent
12d0c9a2fc
commit
9c84b5cc18
@ -992,11 +992,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step {
|
|||||||
const step = b.step(b.fmt("test-{s}", .{options.name}), options.desc);
|
const step = b.step(b.fmt("test-{s}", .{options.name}), options.desc);
|
||||||
|
|
||||||
for (test_targets) |test_target| {
|
for (test_targets) |test_target| {
|
||||||
const is_native = test_target.target.isNative() or
|
if (options.skip_non_native and !test_target.target.isNative())
|
||||||
(test_target.target.os_tag == builtin.os.tag and
|
|
||||||
test_target.target.cpu_arch == builtin.cpu.arch);
|
|
||||||
|
|
||||||
if (options.skip_non_native and !is_native)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const resolved_target = b.resolveTargetQuery(test_target.target);
|
const resolved_target = b.resolveTargetQuery(test_target.target);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user