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

This commit is contained in:
Alex Rønne Petersen 2024-07-21 14:33:22 +02:00
parent db8bc4770c
commit 84e9aec13f
No known key found for this signature in database

View File

@ -63,6 +63,11 @@ pub const Os = struct {
illumos,
other,
// LLVM tags deliberately omitted:
// - kfreebsd
// - darwin
// - nacl
pub inline fn isDarwin(tag: Tag) bool {
return switch (tag) {
.ios, .macos, .watchos, .tvos, .visionos => true,
@ -653,6 +658,10 @@ pub const Abi = enum {
amplification,
ohos,
// LLVM tags deliberately omitted:
// - gnuf64
// - coreclr
pub fn default(arch: Cpu.Arch, os: Os) Abi {
return if (arch.isWasm()) .musl else switch (os.tag) {
.freestanding,
@ -1021,6 +1030,18 @@ pub const Cpu = struct {
ve,
spu_2,
// LLVM tags deliberately omitted:
// - r600
// - le32
// - le64
// - amdil
// - amdil64
// - hsail
// - hsail64
// - shave
// - renderscript32
// - renderscript64
pub inline fn isX86(arch: Arch) bool {
return switch (arch) {
.x86, .x86_64 => true,