authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-21 14:33:22+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-21 22:38:30+02:00
log84e9aec13f0c0bd5e30286493dfdf9fb7665aaf1
treed072d27f1792d6f7452ae89062150f7988b0d7af
parentdb8bc4770c37470e8807c21571d483e3a73f9f69
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Add comments for deliberately omitted/removed LLVM tags.


1 files changed, 21 insertions(+), 0 deletions(-)

lib/std/Target.zig+21
......@@ -63,6 +63,11 @@ pub const Os = struct {
6363 illumos,
6464 other,
6565
66 // LLVM tags deliberately omitted:
67 // - kfreebsd
68 // - darwin
69 // - nacl
70
6671 pub inline fn isDarwin(tag: Tag) bool {
6772 return switch (tag) {
6873 .ios, .macos, .watchos, .tvos, .visionos => true,
......@@ -653,6 +658,10 @@ pub const Abi = enum {
653658 amplification,
654659 ohos,
655660
661 // LLVM tags deliberately omitted:
662 // - gnuf64
663 // - coreclr
664
656665 pub fn default(arch: Cpu.Arch, os: Os) Abi {
657666 return if (arch.isWasm()) .musl else switch (os.tag) {
658667 .freestanding,
......@@ -1021,6 +1030,18 @@ pub const Cpu = struct {
10211030 ve,
10221031 spu_2,
10231032
1033 // LLVM tags deliberately omitted:
1034 // - r600
1035 // - le32
1036 // - le64
1037 // - amdil
1038 // - amdil64
1039 // - hsail
1040 // - hsail64
1041 // - shave
1042 // - renderscript32
1043 // - renderscript64
1044
10241045 pub inline fn isX86(arch: Arch) bool {
10251046 return switch (arch) {
10261047 .x86, .x86_64 => true,