Skip to content

Commit ff02bf4

Browse files
authored
Merge pull request #20402 from alexrp/target-cleanup
std.Target: Remove some obsolete/dead specifiers.
2 parents 6d7bbab + 5e82e90 commit ff02bf4

File tree

9 files changed

+87
-151
lines changed

9 files changed

+87
-151
lines changed

lib/compiler/aro/aro/target.zig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ pub fn intMaxType(target: std.Target) Type {
3939
pub fn intPtrType(target: std.Target) Type {
4040
switch (target.os.tag) {
4141
.haiku => return .{ .specifier = .long },
42-
.nacl => return .{ .specifier = .int },
4342
else => {},
4443
}
4544

@@ -467,7 +466,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
467466
.csky,
468467
.hexagon,
469468
.m68k,
470-
.le32,
471469
.mips,
472470
.mipsel,
473471
.powerpc,
@@ -500,7 +498,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
500498

501499
.aarch64 => copy.cpu.arch = .arm,
502500
.aarch64_be => copy.cpu.arch = .armeb,
503-
.le64 => copy.cpu.arch = .le32,
504501
.amdil64 => copy.cpu.arch = .amdil,
505502
.nvptx64 => copy.cpu.arch = .nvptx,
506503
.wasm64 => copy.cpu.arch = .wasm32,
@@ -547,7 +544,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
547544
.amdgcn,
548545
.bpfeb,
549546
.bpfel,
550-
.le64,
551547
.amdil64,
552548
.nvptx64,
553549
.wasm64,
@@ -572,7 +568,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
572568
.arm => copy.cpu.arch = .aarch64,
573569
.armeb => copy.cpu.arch = .aarch64_be,
574570
.hsail => copy.cpu.arch = .hsail64,
575-
.le32 => copy.cpu.arch = .le64,
576571
.loongarch32 => copy.cpu.arch = .loongarch64,
577572
.mips => copy.cpu.arch = .mips64,
578573
.mipsel => copy.cpu.arch = .mips64el,
@@ -643,8 +638,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
643638
.xtensa => "xtensa",
644639
.nvptx => "nvptx",
645640
.nvptx64 => "nvptx64",
646-
.le32 => "le32",
647-
.le64 => "le64",
648641
.amdil => "amdil",
649642
.amdil64 => "amdil64",
650643
.hsail => "hsail",
@@ -674,7 +667,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
674667
.dragonfly => "dragonfly",
675668
.freebsd => "freebsd",
676669
.fuchsia => "fuchsia",
677-
.kfreebsd => "kfreebsd",
678670
.linux => "linux",
679671
.lv2 => "lv2",
680672
.netbsd => "netbsd",
@@ -686,7 +678,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
686678
.haiku => "haiku",
687679
.minix => "minix",
688680
.rtems => "rtems",
689-
.nacl => "nacl",
690681
.aix => "aix",
691682
.cuda => "cuda",
692683
.nvcl => "nvcl",
@@ -737,7 +728,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
737728
.gnueabi => "gnueabi",
738729
.gnueabihf => "gnueabihf",
739730
.gnuf32 => "gnuf32",
740-
.gnuf64 => "gnuf64",
741731
.gnusf => "gnusf",
742732
.gnux32 => "gnux32",
743733
.gnuilp32 => "gnuilp32",
@@ -752,7 +742,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
752742
.msvc => "msvc",
753743
.itanium => "itanium",
754744
.cygnus => "cygnus",
755-
.coreclr => "coreclr",
756745
.simulator => "simulator",
757746
.macabi => "macabi",
758747
.pixel => "pixel",

lib/std/Target.zig

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ pub const Os = struct {
2323
freebsd,
2424
fuchsia,
2525
ios,
26-
kfreebsd,
2726
linux,
2827
lv2,
2928
macos,
@@ -36,7 +35,6 @@ pub const Os = struct {
3635
haiku,
3736
minix,
3837
rtems,
39-
nacl,
4038
aix,
4139
cuda,
4240
nvcl,
@@ -74,7 +72,7 @@ pub const Os = struct {
7472

7573
pub inline fn isBSD(tag: Tag) bool {
7674
return tag.isDarwin() or switch (tag) {
77-
.kfreebsd, .freebsd, .openbsd, .netbsd, .dragonfly => true,
75+
.freebsd, .openbsd, .netbsd, .dragonfly => true,
7876
else => false,
7977
};
8078
}
@@ -140,13 +138,11 @@ pub const Os = struct {
140138
.ananas,
141139
.cloudabi,
142140
.fuchsia,
143-
.kfreebsd,
144141
.lv2,
145142
.zos,
146143
.haiku,
147144
.minix,
148145
.rtems,
149-
.nacl,
150146
.aix,
151147
.cuda,
152148
.nvcl,
@@ -374,13 +370,11 @@ pub const Os = struct {
374370
.ananas,
375371
.cloudabi,
376372
.fuchsia,
377-
.kfreebsd,
378373
.lv2,
379374
.zos,
380375
.haiku,
381376
.minix,
382377
.rtems,
383-
.nacl,
384378
.aix,
385379
.cuda,
386380
.nvcl,
@@ -563,12 +557,10 @@ pub const Os = struct {
563557
.ananas,
564558
.cloudabi,
565559
.fuchsia,
566-
.kfreebsd,
567560
.lv2,
568561
.zos,
569562
.minix,
570563
.rtems,
571-
.nacl,
572564
.aix,
573565
.cuda,
574566
.nvcl,
@@ -628,7 +620,6 @@ pub const Abi = enum {
628620
gnueabi,
629621
gnueabihf,
630622
gnuf32,
631-
gnuf64,
632623
gnusf,
633624
gnux32,
634625
gnuilp32,
@@ -643,7 +634,6 @@ pub const Abi = enum {
643634
msvc,
644635
itanium,
645636
cygnus,
646-
coreclr,
647637
simulator,
648638
macabi,
649639
pixel,
@@ -673,7 +663,6 @@ pub const Abi = enum {
673663
.zos,
674664
.minix,
675665
.rtems,
676-
.nacl,
677666
.aix,
678667
.cuda,
679668
.nvcl,
@@ -690,7 +679,6 @@ pub const Abi = enum {
690679
.openbsd,
691680
.freebsd,
692681
.fuchsia,
693-
.kfreebsd,
694682
.netbsd,
695683
.hurd,
696684
.haiku,
@@ -1024,8 +1012,6 @@ pub const Cpu = struct {
10241012
xtensa,
10251013
nvptx,
10261014
nvptx64,
1027-
le32,
1028-
le64,
10291015
amdil,
10301016
amdil64,
10311017
hsail,
@@ -1159,7 +1145,6 @@ pub const Cpu = struct {
11591145
.hexagon => .HEXAGON,
11601146
.dxil => .NONE,
11611147
.m68k => .@"68K",
1162-
.le32 => .NONE,
11631148
.mips => .MIPS,
11641149
.mipsel => .MIPS_RS3_LE,
11651150
.powerpc, .powerpcle => .PPC,
@@ -1193,7 +1178,6 @@ pub const Cpu = struct {
11931178
.riscv64 => .RISCV,
11941179
.x86_64 => .X86_64,
11951180
.nvptx64 => .NONE,
1196-
.le64 => .NONE,
11971181
.amdil64 => .NONE,
11981182
.hsail64 => .NONE,
11991183
.spir64 => .NONE,
@@ -1225,7 +1209,6 @@ pub const Cpu = struct {
12251209
.dxil => .Unknown,
12261210
.hexagon => .Unknown,
12271211
.m68k => .Unknown,
1228-
.le32 => .Unknown,
12291212
.mips => .Unknown,
12301213
.mipsel => .Unknown,
12311214
.powerpc, .powerpcle => .POWERPC,
@@ -1259,7 +1242,6 @@ pub const Cpu = struct {
12591242
.riscv64 => .RISCV64,
12601243
.x86_64 => .X64,
12611244
.nvptx64 => .Unknown,
1262-
.le64 => .Unknown,
12631245
.amdil64 => .Unknown,
12641246
.hsail64 => .Unknown,
12651247
.spir64 => .Unknown,
@@ -1297,8 +1279,6 @@ pub const Cpu = struct {
12971279
.hsail,
12981280
.hsail64,
12991281
.kalimba,
1300-
.le32,
1301-
.le64,
13021282
.mipsel,
13031283
.mips64el,
13041284
.msp430,
@@ -1805,8 +1785,6 @@ pub const DynamicLinker = struct {
18051785
.tce,
18061786
.tcele,
18071787
.xcore,
1808-
.le32,
1809-
.le64,
18101788
.amdil,
18111789
.amdil64,
18121790
.hsail,
@@ -1856,12 +1834,10 @@ pub const DynamicLinker = struct {
18561834
.ananas,
18571835
.cloudabi,
18581836
.fuchsia,
1859-
.kfreebsd,
18601837
.lv2,
18611838
.zos,
18621839
.minix,
18631840
.rtems,
1864-
.nacl,
18651841
.aix,
18661842
.cuda,
18671843
.nvcl,
@@ -1904,7 +1880,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 {
19041880
.csky,
19051881
.hexagon,
19061882
.m68k,
1907-
.le32,
19081883
.mips,
19091884
.mipsel,
19101885
.powerpc,
@@ -1943,7 +1918,6 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 {
19431918
.riscv64,
19441919
.x86_64,
19451920
.nvptx64,
1946-
.le64,
19471921
.amdil64,
19481922
.hsail64,
19491923
.spir64,
@@ -2376,11 +2350,9 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
23762350
},
23772351

23782352
.cloudabi,
2379-
.kfreebsd,
23802353
.lv2,
23812354
.zos,
23822355
.rtems,
2383-
.nacl,
23842356
.aix,
23852357
.elfiamcu,
23862358
.mesa3d,
@@ -2447,7 +2419,6 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
24472419
.loongarch32,
24482420
.tce,
24492421
.tcele,
2450-
.le32,
24512422
.amdil,
24522423
.hsail,
24532424
.spir,
@@ -2475,7 +2446,6 @@ pub fn c_type_alignment(target: Target, c_type: CType) u16 {
24752446
.sparcel,
24762447
.sparc64,
24772448
.lanai,
2478-
.le64,
24792449
.nvptx,
24802450
.nvptx64,
24812451
.r600,
@@ -2568,7 +2538,6 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
25682538
.loongarch32,
25692539
.tce,
25702540
.tcele,
2571-
.le32,
25722541
.amdil,
25732542
.hsail,
25742543
.spir,
@@ -2603,7 +2572,6 @@ pub fn c_type_preferred_alignment(target: Target, c_type: CType) u16 {
26032572
.sparcel,
26042573
.sparc64,
26052574
.lanai,
2606-
.le64,
26072575
.nvptx,
26082576
.nvptx64,
26092577
.r600,

0 commit comments

Comments
 (0)