Commit d3e8541268

Alex Rønne Petersen <alex@alexrp.com>
2025-05-06 04:24:24
std.Target: Prune dead targets in Abi.default() and DynamicLinker.standard().
1 parent 35f3055
Changed files (1)
lib
lib/std/Target.zig
@@ -838,7 +838,6 @@ pub const Abi = enum {
             .aix => if (arch == .powerpc) .eabihf else .none,
             .haiku => switch (arch) {
                 .arm,
-                .thumb,
                 .powerpc,
                 => .eabihf,
                 else => .none,
@@ -877,22 +876,13 @@ pub const Abi = enum {
             },
             .freebsd => switch (arch) {
                 .arm,
-                .armeb,
-                .thumb,
-                .thumbeb,
                 .powerpc,
                 => .eabihf,
-                // Soft float tends to be more common for MIPS.
-                .mips,
-                .mipsel,
-                => .eabi,
                 else => .none,
             },
             .netbsd => switch (arch) {
                 .arm,
                 .armeb,
-                .thumb,
-                .thumbeb,
                 .powerpc,
                 => .eabihf,
                 // Soft float tends to be more common for MIPS.
@@ -903,7 +893,6 @@ pub const Abi = enum {
             },
             .openbsd => switch (arch) {
                 .arm,
-                .thumb,
                 => .eabi,
                 .powerpc,
                 => .eabihf,
@@ -2209,7 +2198,6 @@ pub const DynamicLinker = struct {
 
             .haiku => switch (cpu.arch) {
                 .arm,
-                .thumb,
                 .aarch64,
                 .m68k,
                 .powerpc,
@@ -2238,9 +2226,7 @@ pub const DynamicLinker = struct {
 
             .linux => if (abi.isAndroid())
                 switch (cpu.arch) {
-                    .arm,
-                    .thumb,
-                    => if (abi == .androideabi) init("/system/bin/linker") else none,
+                    .arm => if (abi == .androideabi) init("/system/bin/linker") else none,
 
                     .aarch64,
                     .riscv64,
@@ -2458,19 +2444,11 @@ pub const DynamicLinker = struct {
 
             .freebsd => switch (cpu.arch) {
                 .arm,
-                .armeb,
-                .thumb,
-                .thumbeb,
                 .aarch64,
-                .mips,
-                .mipsel,
-                .mips64,
-                .mips64el,
                 .powerpc,
                 .powerpc64,
                 .powerpc64le,
                 .riscv64,
-                .sparc64,
                 .x86,
                 .x86_64,
                 => initFmt("{s}/libexec/ld-elf.so.1", .{
@@ -2485,8 +2463,6 @@ pub const DynamicLinker = struct {
             .netbsd => switch (cpu.arch) {
                 .arm,
                 .armeb,
-                .thumb,
-                .thumbeb,
                 .aarch64,
                 .aarch64_be,
                 .m68k,
@@ -2506,7 +2482,6 @@ pub const DynamicLinker = struct {
 
             .openbsd => switch (cpu.arch) {
                 .arm,
-                .thumb,
                 .aarch64,
                 .mips64,
                 .mips64el,
@@ -2534,11 +2509,16 @@ pub const DynamicLinker = struct {
             },
 
             .illumos,
+            => switch (cpu.arch) {
+                .x86,
+                .x86_64,
+                => initFmt("/lib/{s}ld.so.1", .{if (ptrBitWidth_cpu_abi(cpu, .none) == 64) "64/" else ""}),
+                else => none,
+            },
+
             .solaris,
             => switch (cpu.arch) {
-                .sparc,
                 .sparc64,
-                .x86,
                 .x86_64,
                 => initFmt("/lib/{s}ld.so.1", .{if (ptrBitWidth_cpu_abi(cpu, .none) == 64) "64/" else ""}),
                 else => none,