llvm: fix data layout on ios

Closes #16549
This commit is contained in:
Jacob Young 2023-07-25 22:15:02 -04:00 committed by Andrew Kelley
parent a707f380a5
commit f9717f87f5
2 changed files with 12 additions and 2 deletions

View File

@ -429,7 +429,7 @@ const DataLayoutBuilder = struct {
if (backendSupportsF16(self.target)) try self.typeAlignment(.float, 16, 16, 16, false, writer);
try self.typeAlignment(.float, 32, 32, 32, false, writer);
try self.typeAlignment(.float, 64, 64, 64, false, writer);
if (backendSupportsF80(self.target)) try self.typeAlignment(.float, 80, 0, 0, false, writer);
if (self.target.cpu.arch.isX86()) try self.typeAlignment(.float, 80, 0, 0, false, writer);
try self.typeAlignment(.float, 128, 128, 128, false, writer);
}
switch (self.target.cpu.arch) {
@ -585,7 +585,7 @@ const DataLayoutBuilder = struct {
abi = size;
pref = size;
} else switch (self.target.os.tag) {
.macos => {},
.macos, .ios => {},
.uefi, .windows => {
pref = size;
force_abi = size >= 32;

View File

@ -3,6 +3,8 @@ const Cases = @import("src/Cases.zig");
const targets = [_]std.zig.CrossTarget{
.{ .cpu_arch = .aarch64, .os_tag = .freestanding, .abi = .none },
.{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .none },
.{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .simulator },
.{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .none },
.{ .cpu_arch = .aarch64, .os_tag = .macos, .abi = .none },
.{ .cpu_arch = .aarch64, .os_tag = .uefi, .abi = .none },
@ -102,6 +104,14 @@ const targets = [_]std.zig.CrossTarget{
.{ .cpu_arch = .x86, .os_tag = .windows, .abi = .msvc },
.{ .cpu_arch = .x86_64, .os_tag = .freebsd, .abi = .none },
.{ .cpu_arch = .x86_64, .os_tag = .freestanding, .abi = .none },
.{
.cpu_arch = .x86_64,
.os_tag = .freestanding,
.abi = .none,
.cpu_features_add = std.Target.x86.featureSet(&.{.soft_float}),
.cpu_features_sub = std.Target.x86.featureSet(&.{ .mmx, .sse, .sse2, .avx, .avx2 }),
},
.{ .cpu_arch = .x86_64, .os_tag = .ios, .abi = .simulator },
.{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .none },
.{ .cpu_arch = .x86_64, .os_tag = .macos, .abi = .none },
.{ .cpu_arch = .x86_64, .os_tag = .uefi, .abi = .none },