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...@@ -2356,6 +2356,10 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
2356 // avoid reporting compatibility for 32-bit here since we'd just build a bunch of test binaries2356 // avoid reporting compatibility for 32-bit here since we'd just build a bunch of test binaries
2357 // that never get run anyway. This added almost an hour's worth of useless work to aarch64-linux2357 // that never get run anyway. This added almost an hour's worth of useless work to aarch64-linux
2358 // CI, for example.2358 // 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.
2359 return switch (host.os.tag) {2363 return switch (host.os.tag) {
2360 .illumos => switch (host.cpu.arch) {2364 .illumos => switch (host.cpu.arch) {
2361 .x86_64 => arch == .x86,2365 .x86_64 => arch == .x86,
...@@ -2365,13 +2369,11 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool...@@ -2365,13 +2369,11 @@ fn supportedCompatArch(host: *const std.Target, arch: std.Target.Cpu.Arch) bool
2365 .mips64 => arch == .mips,2369 .mips64 => arch == .mips,
2366 .mips64el => arch == .mipsel,2370 .mips64el => arch == .mipsel,
2367 .powerpc64 => arch == .powerpc,2371 .powerpc64 => arch == .powerpc,
2368 .riscv64 => arch == .riscv32,
2369 .sparc64 => arch == .sparc,2372 .sparc64 => arch == .sparc,
2370 .x86_64 => arch == .x86,2373 .x86_64 => arch == .x86,
2371 else => false,2374 else => false,
2372 },2375 },
2373 .netbsd => switch (host.cpu.arch) {2376 .netbsd => switch (host.cpu.arch) {
2374 .riscv64 => arch == .riscv32,
2375 .sparc64 => arch == .sparc,2377 .sparc64 => arch == .sparc,
2376 .x86_64 => arch == .x86,2378 .x86_64 => arch == .x86,
2377 else => false,2379 else => false,