| ... | ... | @@ -2345,27 +2345,39 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 2345 | 2345 | } |
| 2346 | 2346 | } |
| 2347 | 2347 | |
| 2348 | const resolved_target = b.resolveTargetQuery(test_target.target); |
| 2349 | const target = &resolved_target.result; |
| 2350 | |
| 2351 | if (test_target.link_libc == false and target.requiresLibC()) continue; |
| 2352 | // If the target requires libc, there's no point building the cases that |
| 2353 | // don't explicitly link libc as they'll just end up actually linking |
| 2354 | // libc anyway, thus creating duplicate work and making -Dskip-libc not |
| 2355 | // work as expected. |
| 2356 | if (test_target.link_libc == null and target.requiresLibC()) continue; |
| 2357 | // These targets don't strictly require libc, but we don't yet have a |
| 2358 | // syscall layer for them, so the compiler links libc by default. They |
| 2359 | // therefore get the same treatment here. |
| 2360 | if (test_target.link_libc == null and (target.os.tag == .freebsd or target.os.tag == .netbsd)) continue; |
| 2361 | |
| 2348 | 2362 | if (!options.test_extra_targets and test_target.extra_target) continue; |
| 2349 | 2363 | |
| 2350 | 2364 | if (options.skip_non_native and !test_target.target.isNative()) |
| 2351 | 2365 | continue; |
| 2352 | 2366 | |
| 2353 | | if (options.skip_spirv and test_target.target.cpu_arch != null and test_target.target.cpu_arch.?.isSpirV()) continue; |
| 2354 | | if (options.skip_wasm and test_target.target.cpu_arch != null and test_target.target.cpu_arch.?.isWasm()) continue; |
| 2367 | if (options.skip_spirv and target.cpu.arch.isSpirV()) continue; |
| 2368 | if (options.skip_wasm and target.cpu.arch.isWasm()) continue; |
| 2355 | 2369 | |
| 2356 | | if (options.skip_freebsd and test_target.target.os_tag == .freebsd) continue; |
| 2357 | | if (options.skip_netbsd and test_target.target.os_tag == .netbsd) continue; |
| 2358 | | if (options.skip_openbsd and test_target.target.os_tag == .openbsd) continue; |
| 2359 | | if (options.skip_windows and test_target.target.os_tag == .windows) continue; |
| 2360 | | if (options.skip_darwin and test_target.target.os_tag != null and test_target.target.os_tag.?.isDarwin()) continue; |
| 2361 | | if (options.skip_linux and test_target.target.os_tag == .linux) continue; |
| 2370 | if (options.skip_freebsd and target.os.tag == .freebsd) continue; |
| 2371 | if (options.skip_netbsd and target.os.tag == .netbsd) continue; |
| 2372 | if (options.skip_openbsd and target.os.tag == .openbsd) continue; |
| 2373 | if (options.skip_windows and target.os.tag == .windows) continue; |
| 2374 | if (options.skip_darwin and target.os.tag.isDarwin()) continue; |
| 2375 | if (options.skip_linux and target.os.tag == .linux) continue; |
| 2362 | 2376 | |
| 2363 | 2377 | const would_use_llvm = wouldUseLlvm(test_target.use_llvm, test_target.target, test_target.optimize_mode); |
| 2364 | 2378 | if (options.skip_llvm and would_use_llvm) continue; |
| 2365 | 2379 | |
| 2366 | | const resolved_target = b.resolveTargetQuery(test_target.target); |
| 2367 | 2380 | const triple_txt = resolved_target.query.zigTriple(b.allocator) catch @panic("OOM"); |
| 2368 | | const target = &resolved_target.result; |
| 2369 | 2381 | |
| 2370 | 2382 | if (options.test_target_filters.len > 0) { |
| 2371 | 2383 | for (options.test_target_filters) |filter| { |