@@ -117,8 +117,8 @@ pub fn int64Type(target: std.Target) Type {
117117
118118 .sparc64 = > return intMaxType (target ),
119119
120- .x86 , .x86_64 = > if (! target .isDarwin ()) return intMaxType (target ),
121- .aarch64 , .aarch64_be = > if (! target .isDarwin () and target .os .tag != .openbsd and target .os .tag != .windows ) return .{ .specifier = .long },
120+ .x86 , .x86_64 = > if (! target .os . tag . isDarwin ()) return intMaxType (target ),
121+ .aarch64 , .aarch64_be = > if (! target .os . tag . isDarwin () and target .os .tag != .openbsd and target .os .tag != .windows ) return .{ .specifier = .long },
122122 else = > {},
123123 }
124124 return .{ .specifier = .long_long };
@@ -144,7 +144,7 @@ pub fn defaultFunctionAlignment(target: std.Target) u8 {
144144}
145145
146146pub fn isTlsSupported (target : std.Target ) bool {
147- if (target .isDarwin ()) {
147+ if (target .os . tag . isDarwin ()) {
148148 var supported = false ;
149149 switch (target .os .tag ) {
150150 .macos = > supported = ! (target .os .isAtLeast (.macos , .{ .major = 10 , .minor = 7 , .patch = 0 }) orelse false ),
@@ -199,7 +199,7 @@ pub fn minZeroWidthBitfieldAlignment(target: std.Target) ?u29 {
199199pub fn unnamedFieldAffectsAlignment (target : std.Target ) bool {
200200 switch (target .cpu .arch ) {
201201 .aarch64 = > {
202- if (target .isDarwin () or target .os .tag == .windows ) return false ;
202+ if (target .os . tag . isDarwin () or target .os .tag == .windows ) return false ;
203203 return true ;
204204 },
205205 .armeb = > {
@@ -229,7 +229,7 @@ pub fn packAllEnums(target: std.Target) bool {
229229pub fn defaultAlignment (target : std.Target ) u29 {
230230 switch (target .cpu .arch ) {
231231 .avr = > return 1 ,
232- .arm = > if (target .isAndroid () or target .os .tag == .ios ) return 16 else return 8 ,
232+ .arm = > if (target .abi . isAndroid () or target .os .tag == .ios ) return 16 else return 8 ,
233233 .sparc = > if (std .Target .sparc .featureSetHas (target .cpu .features , .v9 )) return 16 else return 8 ,
234234 .mips , .mipsel = > switch (target .abi ) {
235235 .none , .gnuabi64 = > return 16 ,
@@ -242,9 +242,8 @@ pub fn defaultAlignment(target: std.Target) u29 {
242242pub fn systemCompiler (target : std.Target ) LangOpts.Compiler {
243243 // Android is linux but not gcc, so these checks go first
244244 // the rest for documentation as fn returns .clang
245- if (target .isDarwin () or
246- target .isAndroid () or
247- target .isBSD () or
245+ if (target .abi .isAndroid () or
246+ target .os .tag .isBSD () or
248247 target .os .tag == .fuchsia or
249248 target .os .tag == .solaris or
250249 target .os .tag == .haiku or
@@ -268,7 +267,7 @@ pub fn systemCompiler(target: std.Target) LangOpts.Compiler {
268267
269268pub fn hasFloat128 (target : std.Target ) bool {
270269 if (target .cpu .arch .isWasm ()) return true ;
271- if (target .isDarwin ()) return false ;
270+ if (target .os . tag . isDarwin ()) return false ;
272271 if (target .cpu .arch .isPowerPC ()) return std .Target .powerpc .featureSetHas (target .cpu .features , .float128 );
273272 return switch (target .os .tag ) {
274273 .dragonfly ,
@@ -461,7 +460,6 @@ pub fn get32BitArchVariant(target: std.Target) ?std.Target {
461460 .amdgcn ,
462461 .avr ,
463462 .msp430 ,
464- .spu_2 ,
465463 .ve ,
466464 .bpfel ,
467465 .bpfeb ,
@@ -522,7 +520,6 @@ pub fn get64BitArchVariant(target: std.Target) ?std.Target {
522520 .lanai ,
523521 .m68k ,
524522 .msp430 ,
525- .spu_2 ,
526523 .xcore ,
527524 .xtensa ,
528525 = > return null ,
@@ -620,8 +617,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
620617 .wasm32 = > "wasm32" ,
621618 .wasm64 = > "wasm64" ,
622619 .ve = > "ve" ,
623- // Note: spu_2 is not supported in LLVM; this is the Zig arch name
624- .spu_2 = > "spu_2" ,
625620 };
626621 writer .writeAll (llvm_arch ) catch unreachable ;
627622 writer .writeByte ('-' ) catch unreachable ;
0 commit comments