authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-06 04:24:24+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-05-08 21:32:20+02:00
logd3e85412689ad3f53e2bfcd1b1ede4f02b77598f
tree97fd692e5702341c30fe24b5118fe21dc060a283
parent35f30558ad2836b83859d8ba64a593a0603d4e0e
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Prune dead targets in Abi.default() and DynamicLinker.standard().


1 files changed, 8 insertions(+), 28 deletions(-)

lib/std/Target.zig+8-28
......@@ -838,7 +838,6 @@ pub const Abi = enum {
838838 .aix => if (arch == .powerpc) .eabihf else .none,
839839 .haiku => switch (arch) {
840840 .arm,
841 .thumb,
842841 .powerpc,
843842 => .eabihf,
844843 else => .none,
......@@ -877,22 +876,13 @@ pub const Abi = enum {
877876 },
878877 .freebsd => switch (arch) {
879878 .arm,
880 .armeb,
881 .thumb,
882 .thumbeb,
883879 .powerpc,
884880 => .eabihf,
885 // Soft float tends to be more common for MIPS.
886 .mips,
887 .mipsel,
888 => .eabi,
889881 else => .none,
890882 },
891883 .netbsd => switch (arch) {
892884 .arm,
893885 .armeb,
894 .thumb,
895 .thumbeb,
896886 .powerpc,
897887 => .eabihf,
898888 // Soft float tends to be more common for MIPS.
......@@ -903,7 +893,6 @@ pub const Abi = enum {
903893 },
904894 .openbsd => switch (arch) {
905895 .arm,
906 .thumb,
907896 => .eabi,
908897 .powerpc,
909898 => .eabihf,
......@@ -2209,7 +2198,6 @@ pub const DynamicLinker = struct {
22092198
22102199 .haiku => switch (cpu.arch) {
22112200 .arm,
2212 .thumb,
22132201 .aarch64,
22142202 .m68k,
22152203 .powerpc,
......@@ -2238,9 +2226,7 @@ pub const DynamicLinker = struct {
22382226
22392227 .linux => if (abi.isAndroid())
22402228 switch (cpu.arch) {
2241 .arm,
2242 .thumb,
2243 => if (abi == .androideabi) init("/system/bin/linker") else none,
2229 .arm => if (abi == .androideabi) init("/system/bin/linker") else none,
22442230
22452231 .aarch64,
22462232 .riscv64,
......@@ -2458,19 +2444,11 @@ pub const DynamicLinker = struct {
24582444
24592445 .freebsd => switch (cpu.arch) {
24602446 .arm,
2461 .armeb,
2462 .thumb,
2463 .thumbeb,
24642447 .aarch64,
2465 .mips,
2466 .mipsel,
2467 .mips64,
2468 .mips64el,
24692448 .powerpc,
24702449 .powerpc64,
24712450 .powerpc64le,
24722451 .riscv64,
2473 .sparc64,
24742452 .x86,
24752453 .x86_64,
24762454 => initFmt("{s}/libexec/ld-elf.so.1", .{
......@@ -2485,8 +2463,6 @@ pub const DynamicLinker = struct {
24852463 .netbsd => switch (cpu.arch) {
24862464 .arm,
24872465 .armeb,
2488 .thumb,
2489 .thumbeb,
24902466 .aarch64,
24912467 .aarch64_be,
24922468 .m68k,
......@@ -2506,7 +2482,6 @@ pub const DynamicLinker = struct {
25062482
25072483 .openbsd => switch (cpu.arch) {
25082484 .arm,
2509 .thumb,
25102485 .aarch64,
25112486 .mips64,
25122487 .mips64el,
......@@ -2534,11 +2509,16 @@ pub const DynamicLinker = struct {
25342509 },
25352510
25362511 .illumos,
2512 => switch (cpu.arch) {
2513 .x86,
2514 .x86_64,
2515 => initFmt("/lib/{s}ld.so.1", .{if (ptrBitWidth_cpu_abi(cpu, .none) == 64) "64/" else ""}),
2516 else => none,
2517 },
2518
25372519 .solaris,
25382520 => switch (cpu.arch) {
2539 .sparc,
25402521 .sparc64,
2541 .x86,
25422522 .x86_64,
25432523 => initFmt("/lib/{s}ld.so.1", .{if (ptrBitWidth_cpu_abi(cpu, .none) == 64) "64/" else ""}),
25442524 else => none,