compiler: let LLVM set the 64bit feature from the target triple on powerpc targets

This commit is contained in:
Alex Rønne Petersen
2026-01-18 12:11:52 +01:00
parent bb7a43490f
commit a8e624d7f1
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -6808,6 +6808,7 @@ pub fn addCCArgs(
// We communicate these to Clang through the dedicated options. // We communicate these to Clang through the dedicated options.
if (std.mem.startsWith(u8, llvm_name, "soft-float") or if (std.mem.startsWith(u8, llvm_name, "soft-float") or
std.mem.startsWith(u8, llvm_name, "hard-float") or std.mem.startsWith(u8, llvm_name, "hard-float") or
(target.cpu.arch.isPowerPC() and std.mem.startsWith(u8, llvm_name, "64bit")) or
(target.cpu.arch.isX86() and std.mem.startsWith(u8, llvm_name, "x32")) or (target.cpu.arch.isX86() and std.mem.startsWith(u8, llvm_name, "x32")) or
(target.cpu.arch == .s390x and std.mem.eql(u8, llvm_name, "backchain"))) (target.cpu.arch == .s390x and std.mem.eql(u8, llvm_name, "backchain")))
continue; continue;
+1
View File
@@ -347,6 +347,7 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
// See https://github.com/ziglang/zig/issues/23539 // See https://github.com/ziglang/zig/issues/23539
if (target_util.isDynamicAMDGCNFeature(target, feature)) continue; if (target_util.isDynamicAMDGCNFeature(target, feature)) continue;
if (target.cpu.arch.isPowerPC() and @as(std.Target.powerpc.Feature, @enumFromInt(feature.index)) == .@"64bit") continue;
if (target.cpu.arch.isX86() and @as(std.Target.x86.Feature, @enumFromInt(feature.index)) == .x32) continue; if (target.cpu.arch.isX86() and @as(std.Target.x86.Feature, @enumFromInt(feature.index)) == .x32) continue;
var is_enabled = target.cpu.features.isEnabled(feature.index); var is_enabled = target.cpu.features.isEnabled(feature.index);