authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-09 09:33:50+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-09 09:33:50+02:00
log35accc06ed41d5c1d4f510f60058e47ce51ae033
treec3a11bde9334e0da8de9cbc4691ec6f13e3e817f
parent40a0d70b8127e4e776b4198ca8d1de707ddb44d8
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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
......@@ -2329,6 +2329,10 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
23292329 // avoid reporting compatibility for 32-bit here since we'd just build a bunch of test binaries
23302330 // that never get run anyway. This added almost an hour's worth of useless work to aarch64-linux
23312331 // CI, for example.
2332 //
2333 // riscv64-linux and riscv64-netbsd similarly support 32-bit binaries. However, this requires a
2334 // very recent kernel and for the kernel feature to be enabled. Additionally, contemporary
2335 // RISC-V hardware is just too slow to justify building the 32-bit binaries.
23322336 return switch (host.os.tag) {
23332337 .illumos => switch (host.cpu.arch) {
23342338 .x86_64 => arch == .x86,
......@@ -2338,13 +2342,11 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
23382342 .mips64 => arch == .mips,
23392343 .mips64el => arch == .mipsel,
23402344 .powerpc64 => arch == .powerpc,
2341 .riscv64 => arch == .riscv32,
23422345 .sparc64 => arch == .sparc,
23432346 .x86_64 => arch == .x86,
23442347 else => false,
23452348 },
23462349 .netbsd => switch (host.cpu.arch) {
2347 .riscv64 => arch == .riscv32,
23482350 .sparc64 => arch == .sparc,
23492351 .x86_64 => arch == .x86,
23502352 else => false,