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...@@ -2329,6 +2329,10 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
2329 // avoid reporting compatibility for 32-bit here since we'd just build a bunch of test binaries2329 // avoid reporting compatibility for 32-bit here since we'd just build a bunch of test binaries
2330 // that never get run anyway. This added almost an hour's worth of useless work to aarch64-linux2330 // that never get run anyway. This added almost an hour's worth of useless work to aarch64-linux
2331 // CI, for example.2331 // 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.
2332 return switch (host.os.tag) {2336 return switch (host.os.tag) {
2333 .illumos => switch (host.cpu.arch) {2337 .illumos => switch (host.cpu.arch) {
2334 .x86_64 => arch == .x86,2338 .x86_64 => arch == .x86,
...@@ -2338,13 +2342,11 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool...@@ -2338,13 +2342,11 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
2338 .mips64 => arch == .mips,2342 .mips64 => arch == .mips,
2339 .mips64el => arch == .mipsel,2343 .mips64el => arch == .mipsel,
2340 .powerpc64 => arch == .powerpc,2344 .powerpc64 => arch == .powerpc,
2341 .riscv64 => arch == .riscv32,
2342 .sparc64 => arch == .sparc,2345 .sparc64 => arch == .sparc,
2343 .x86_64 => arch == .x86,2346 .x86_64 => arch == .x86,
2344 else => false,2347 else => false,
2345 },2348 },
2346 .netbsd => switch (host.cpu.arch) {2349 .netbsd => switch (host.cpu.arch) {
2347 .riscv64 => arch == .riscv32,
2348 .sparc64 => arch == .sparc,2350 .sparc64 => arch == .sparc,
2349 .x86_64 => arch == .x86,2351 .x86_64 => arch == .x86,
2350 else => false,2352 else => false,