authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-18 11:55:14+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-25 21:54:47+02:00
logbb7a43490f29cbe98974ba66ebd274bceb694acf
tree1e9350752d968d510b06b45a5da553f3c2d8efca
parent4c50c4b6e5ba1b57e37194fb307d176bef16f810
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

compiler: let LLVM set the x32 feature from the target triple on x86 targets


2 files changed, 3 insertions(+), 0 deletions(-)

src/Compilation.zig+1
......@@ -6808,6 +6808,7 @@ pub fn addCCArgs(
68086808 // We communicate these to Clang through the dedicated options.
68096809 if (std.mem.startsWith(u8, llvm_name, "soft-float") or
68106810 std.mem.startsWith(u8, llvm_name, "hard-float") or
6811 (target.cpu.arch.isX86() and std.mem.startsWith(u8, llvm_name, "x32")) or
68116812 (target.cpu.arch == .s390x and std.mem.eql(u8, llvm_name, "backchain")))
68126813 continue;
68136814
src/Package/Module.zig+2
......@@ -347,6 +347,8 @@ pub fn create(arena: Allocator, options: CreateOptions) !*Package.Module {
347347 // See https://github.com/ziglang/zig/issues/23539
348348 if (target_util.isDynamicAMDGCNFeature(target, feature)) continue;
349349
350 if (target.cpu.arch.isX86() and @as(std.Target.x86.Feature, @enumFromInt(feature.index)) == .x32) continue;
351
350352 var is_enabled = target.cpu.features.isEnabled(feature.index);
351353 if (target.cpu.arch == .s390x and @as(std.Target.s390x.Feature, @enumFromInt(feature.index)) == .backchain) {
352354 is_enabled = !omit_frame_pointer;