Skip to content

Commit 8f7cbaa

Browse files
authored
Merge pull request #20870 from alexrp/target-cleanup-3
`std.Target`: Remove more dead OS/architecture tags
2 parents f17f73b + 62a0185 commit 8f7cbaa

File tree

21 files changed

+42
-110
lines changed

21 files changed

+42
-110
lines changed

lib/compiler/aro/aro/Compilation.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ fn generateSystemDefines(comp: *Compilation, w: anytype) !void {
363363
\\#define __sparc_v9__ 1
364364
\\
365365
),
366-
.sparc, .sparcel => try w.writeAll(
366+
.sparc => try w.writeAll(
367367
\\#define __sparc__ 1
368368
\\#define __sparc 1
369369
\\
@@ -534,7 +534,7 @@ pub fn generateBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefi
534534

535535
if (system_defines_mode == .include_system_defines) {
536536
try buf.appendSlice(
537-
\\#define __VERSION__ "Aro
537+
\\#define __VERSION__ "Aro
538538
++ @import("../backend.zig").version_str ++ "\"\n" ++
539539
\\#define __Aro__
540540
\\

lib/compiler/aro/aro/Driver/GCCDetector.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ fn collectLibDirsAndTriples(
376376
biarch_libdirs.appendSliceAssumeCapacity(&RISCV32LibDirs);
377377
biarch_triple_aliases.appendSliceAssumeCapacity(&RISCV32Triples);
378378
},
379-
.sparc, .sparcel => {
379+
.sparc => {
380380
lib_dirs.appendSliceAssumeCapacity(&SPARCv8LibDirs);
381381
triple_aliases.appendSliceAssumeCapacity(&SPARCv8Triples);
382382
biarch_libdirs.appendSliceAssumeCapacity(&SPARCv9LibDirs);

lib/compiler/aro/aro/target.zig

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,12 @@ pub fn intPtrType(target: std.Target) Type {
5353
.xcore,
5454
.hexagon,
5555
.m68k,
56-
.spir,
5756
.spirv32,
5857
.arc,
5958
.avr,
6059
=> return .{ .specifier = .int },
6160

62-
.sparc, .sparcel => switch (target.os.tag) {
61+
.sparc => switch (target.os.tag) {
6362
.netbsd, .openbsd => {},
6463
else => return .{ .specifier = .int },
6564
},
@@ -133,7 +132,7 @@ pub fn defaultFunctionAlignment(target: std.Target) u8 {
133132
return switch (target.cpu.arch) {
134133
.arm, .armeb => 4,
135134
.aarch64, .aarch64_be => 4,
136-
.sparc, .sparcel, .sparc64 => 4,
135+
.sparc, .sparc64 => 4,
137136
.riscv64 => 2,
138137
else => 1,
139138
};
@@ -427,7 +426,7 @@ pub fn ldEmulationOption(target: std.Target, arm_endianness: ?std.builtin.Endian
427426
.powerpc64le => "elf64lppc",
428427
.riscv32 => "elf32lriscv",
429428
.riscv64 => "elf64lriscv",
430-
.sparc, .sparcel => "elf32_sparc",
429+
.sparc => "elf32_sparc",
431430
.sparc64 => "elf64_sparc",
432431
.loongarch32 => "elf32loongarch",
433432
.loongarch64 => "elf64loongarch",
@@ -467,13 +466,11 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
467466
.powerpcle,
468467
.riscv32,
469468
.sparc,
470-
.sparcel,
471469
.thumb,
472470
.thumbeb,
473471
.x86,
474472
.xcore,
475473
.nvptx,
476-
.spir,
477474
.kalimba,
478475
.lanai,
479476
.wasm32,
@@ -487,7 +484,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
487484
.aarch64_be => copy.cpu.arch = .armeb,
488485
.nvptx64 => copy.cpu.arch = .nvptx,
489486
.wasm64 => copy.cpu.arch = .wasm32,
490-
.spir64 => copy.cpu.arch = .spir,
491487
.spirv64 => copy.cpu.arch = .spirv32,
492488
.loongarch64 => copy.cpu.arch = .loongarch32,
493489
.mips64 => copy.cpu.arch = .mips,
@@ -513,7 +509,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
513509
.lanai,
514510
.m68k,
515511
.msp430,
516-
.sparcel,
517512
.spu_2,
518513
.xcore,
519514
.xtensa,
@@ -526,7 +521,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
526521
.bpfel,
527522
.nvptx64,
528523
.wasm64,
529-
.spir64,
530524
.spirv64,
531525
.loongarch64,
532526
.mips64,
@@ -550,7 +544,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
550544
.powerpcle => copy.cpu.arch = .powerpc64le,
551545
.riscv32 => copy.cpu.arch = .riscv64,
552546
.sparc => copy.cpu.arch = .sparc64,
553-
.spir => copy.cpu.arch = .spir64,
554547
.spirv32 => copy.cpu.arch = .spirv64,
555548
.thumb => copy.cpu.arch = .aarch64,
556549
.thumbeb => copy.cpu.arch = .aarch64_be,
@@ -597,7 +590,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
597590
.riscv64 => "riscv64",
598591
.sparc => "sparc",
599592
.sparc64 => "sparc64",
600-
.sparcel => "sparcel",
601593
.s390x => "s390x",
602594
.thumb => "thumb",
603595
.thumbeb => "thumbeb",
@@ -607,8 +599,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
607599
.xtensa => "xtensa",
608600
.nvptx => "nvptx",
609601
.nvptx64 => "nvptx64",
610-
.spir => "spir",
611-
.spir64 => "spir64",
612602
.spirv32 => "spirv32",
613603
.spirv64 => "spirv64",
614604
.kalimba => "kalimba",
@@ -624,8 +614,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
624614

625615
const llvm_os = switch (target.os.tag) {
626616
.freestanding => "unknown",
627-
.ananas => "ananas",
628-
.cloudabi => "cloudabi",
629617
.dragonfly => "dragonfly",
630618
.freebsd => "freebsd",
631619
.fuchsia => "fuchsia",

lib/compiler/aro/aro/toolchains/Linux.zig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ fn getOSLibDir(target: std.Target) []const u8 {
357357
.powerpc,
358358
.powerpcle,
359359
.sparc,
360-
.sparcel,
361360
=> return "lib32",
362361
else => {},
363362
}

lib/compiler_rt/atomics.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const largest_atomic_size = switch (arch) {
3030
// On SPARC systems that lacks CAS and/or swap instructions, the only
3131
// available atomic operation is a test-and-set (`ldstub`), so we force
3232
// every atomic memory access to go through the lock.
33-
.sparc, .sparcel => if (cpu.features.featureSetHas(.hasleoncasa)) @sizeOf(usize) else 0,
33+
.sparc => if (cpu.features.featureSetHas(.hasleoncasa)) @sizeOf(usize) else 0,
3434

3535
// XXX: On x86/x86_64 we could check the presence of cmpxchg8b/cmpxchg16b
3636
// and set this parameter accordingly.

lib/compiler_rt/clear_cache.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn clear_cache(start: usize, end: usize) callconv(.C) void {
4141
else => false,
4242
};
4343
const sparc = switch (arch) {
44-
.sparc, .sparc64, .sparcel => true,
44+
.sparc, .sparc64 => true,
4545
else => false,
4646
};
4747
const apple = switch (os) {

0 commit comments

Comments
 (0)