diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-04-27 01:20:19 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-04-28 00:24:09 +0200 |
| commit | e7b46363aea6e42c206cb7b1bd8c9b47a83d9045 (patch) | |
| tree | 9a31a2fea3bf9b68a461f65073c6bf5c5caa3158 /src | |
| parent | 1b76d4c53adafebcbfcf0476276375353139dacb (diff) | |
| download | zig-e7b46363aea6e42c206cb7b1bd8c9b47a83d9045.tar.gz zig-e7b46363aea6e42c206cb7b1bd8c9b47a83d9045.zip | |
std.Target: Remove Os.Tag.elfiamcu.
The last Intel Quark MCU was released in 2015. Quark was announced to be EOL in
2019, and stopped shipping entirely in 2022.
The OS tag was only meaningful for Intel's weird fork of Linux 3.8.7 with a
special ABI that differs from the regular i386 System V ABI; beyond that, the
CPU itself is just a plain old P54C (i586). We of course keep support for the
CPU itself, just not Intel's Linux fork.
Diffstat (limited to 'src')
| -rw-r--r-- | src/codegen/llvm.zig | 51 | ||||
| -rw-r--r-- | src/link/Elf.zig | 1 |
2 files changed, 23 insertions, 29 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index a16f681f86..34982ad700 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -208,7 +208,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 { .opencl => "unknown", // https://llvm.org/docs/SPIRVUsage.html#target-triples .ps4 => "ps4", .ps5 => "ps5", - .elfiamcu => "elfiamcu", .mesa3d => "mesa3d", .amdpal => "amdpal", .hermit => "hermit", @@ -402,36 +401,32 @@ pub fn dataLayout(target: std.Target) []const u8 { "E-m:l-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64" else "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64", - .x86 => switch (target.os.tag) { - .elfiamcu => "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:32-f64:32-f128:32-n8:16:32-a:0:32-S32", - .windows => switch (target.abi) { - .cygnus => "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32", - .gnu => if (target.ofmt == .coff) - "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" - else - "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32", - else => blk: { - const msvc = switch (target.abi) { - .none, .msvc => true, - else => false, - }; + .x86 => if (target.os.tag == .windows) switch (target.abi) { + .cygnus => "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32", + .gnu => if (target.ofmt == .coff) + "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" + else + "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32", + else => blk: { + const msvc = switch (target.abi) { + .none, .msvc => true, + else => false, + }; - break :blk if (target.ofmt == .coff) - if (msvc) - "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" - else - "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" - else if (msvc) - "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" + break :blk if (target.ofmt == .coff) + if (msvc) + "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" else - "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"; - }, + "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" + else if (msvc) + "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" + else + "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"; }, - else => if (target.ofmt == .macho) - "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128" - else - "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128", - }, + } else if (target.ofmt == .macho) + "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128" + else + "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128", .x86_64 => if (target.os.tag.isDarwin() or target.ofmt == .macho) "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" else switch (target.abi) { diff --git a/src/link/Elf.zig b/src/link/Elf.zig index a338ec722d..93513701df 100644 --- a/src/link/Elf.zig +++ b/src/link/Elf.zig @@ -4174,7 +4174,6 @@ fn getLDMOption(target: std.Target) ?[]const u8 { .s390x => "elf64_s390", .sparc64 => "elf64_sparc", .x86 => switch (target.os.tag) { - .elfiamcu => "elf_iamcu", .freebsd => "elf_i386_fbsd", else => "elf_i386", }, |
