authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-09 09:33:50+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-10-09 11:06:14-07:00
log945f2c855f660cc6cd8823bdcfb767ebafbe6be0
tree6a6a7131ff8f1c58f104d95756362daaea9a7314
parent7eae7feea45c4def744f631e7c435fcff6c61cf5

test: don't claim compatibility for 32-bit RISC-V on 64-bit RISC-V


1 files changed, 4 insertions(+), 2 deletions(-)

test/tests.zig+4-2
......@@ -2356,6 +2356,10 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
23562356 // avoid reporting compatibility for 32-bit here since we'd just build a bunch of test binaries
23572357 // that never get run anyway. This added almost an hour's worth of useless work to aarch64-linux
23582358 // CI, for example.
2359 //
2360 // riscv64-linux and riscv64-netbsd similarly support 32-bit binaries. However, this requires a
2361 // very recent kernel and for the kernel feature to be enabled. Additionally, contemporary
2362 // RISC-V hardware is just too slow to justify building the 32-bit binaries.
23592363 return switch (host.os.tag) {
23602364 .illumos => switch (host.cpu.arch) {
23612365 .x86_64 => arch == .x86,
......@@ -2365,13 +2369,11 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
23652369 .mips64 => arch == .mips,
23662370 .mips64el => arch == .mipsel,
23672371 .powerpc64 => arch == .powerpc,
2368 .riscv64 => arch == .riscv32,
23692372 .sparc64 => arch == .sparc,
23702373 .x86_64 => arch == .x86,
23712374 else => false,
23722375 },
23732376 .netbsd => switch (host.cpu.arch) {
2374 .riscv64 => arch == .riscv32,
23752377 .sparc64 => arch == .sparc,
23762378 .x86_64 => arch == .x86,
23772379 else => false,