diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-05-06 04:24:24 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-05-08 21:32:20 +0200 |
| commit | d3e85412689ad3f53e2bfcd1b1ede4f02b77598f (patch) | |
| tree | 97fd692e5702341c30fe24b5118fe21dc060a283 /lib/std/Target.zig | |
| parent | 35f30558ad2836b83859d8ba64a593a0603d4e0e (diff) | |
| download | zig-d3e85412689ad3f53e2bfcd1b1ede4f02b77598f.tar.gz zig-d3e85412689ad3f53e2bfcd1b1ede4f02b77598f.zip | |
std.Target: Prune dead targets in Abi.default() and DynamicLinker.standard().
Diffstat (limited to 'lib/std/Target.zig')
| -rw-r--r-- | lib/std/Target.zig | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 88477354f6..fa56135a95 100644 --- a/lib/std/Target.zig +++ b/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, |
