diff options
| author | Maciej 'vesim' Kuliński <vesim809@pm.me> | 2025-07-21 13:02:27 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-08-26 07:50:06 +0200 |
| commit | ff859088e409f3fcf7c4f52e58ec4e6e9f7f1c4e (patch) | |
| tree | a4de53d27594d23fb8cb61364d745feb1e11bd0b /lib/std/Target.zig | |
| parent | 99b2b61516b7ee9c4cd31ebe88161dd7191c2e0d (diff) | |
| download | zig-ff859088e409f3fcf7c4f52e58ec4e6e9f7f1c4e.tar.gz zig-ff859088e409f3fcf7c4f52e58ec4e6e9f7f1c4e.zip | |
std.Target: add vita os
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
Diffstat (limited to 'lib/std/Target.zig')
| -rw-r--r-- | lib/std/Target.zig | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 4b65b782b6..24deffbf1a 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -55,6 +55,7 @@ pub const Os = struct { ps3, ps4, ps5, + vita, emscripten, wasi, @@ -198,6 +199,8 @@ pub const Os = struct { .@"3ds", + .vita, + .wasi, .amdhsa, @@ -607,6 +610,7 @@ pub const Os = struct { .max = .{ .major = 2, .minor = 11, .patch = 0 }, }, }, + .@"3ds" => .{ .semver = .{ // These signify release versions (https://www.3dbrew.org/wiki/NCCH/Extended_Header#ARM11_Kernel_Capabilities) @@ -618,6 +622,15 @@ pub const Os = struct { .max = .{ .major = 2, .minor = 58, .patch = 0 }, // 11.17.0-50 }, }, + + .vita => .{ + .semver = .{ + // 1.3 is the first public release + .min = .{ .major = 1, .minor = 3, .patch = 0 }, + .max = .{ .major = 3, .minor = 60, .patch = 0 }, + }, + }, + .wasi => .{ .semver = .{ .min = .{ .major = 0, .minor = 1, .patch = 0 }, @@ -876,6 +889,7 @@ pub const Abi = enum { .windows => .gnu, .uefi => .msvc, .@"3ds" => .eabihf, + .vita => .eabihf, .wasi, .emscripten => .musl, .contiki, @@ -1863,9 +1877,14 @@ pub const Cpu = struct { .amdgcn => &amdgcn.cpu.gfx906, .arm => switch (os.tag) { .@"3ds" => &arm.cpu.mpcore, + .vita => &arm.cpu.cortex_a9, + else => &arm.cpu.baseline, + }, + .thumb => switch (os.tag) { + .vita => &arm.cpu.cortex_a9, else => &arm.cpu.baseline, }, - .armeb, .thumb, .thumbeb => &arm.cpu.baseline, + .armeb, .thumbeb => &arm.cpu.baseline, .aarch64 => switch (os.tag) { .driverkit, .macos => &aarch64.cpu.apple_m1, .ios, .tvos => &aarch64.cpu.apple_a7, @@ -2079,6 +2098,7 @@ pub fn requiresLibC(target: *const Target) bool { .amdhsa, .ps4, .ps5, + .vita, .mesa3d, .contiki, .amdpal, @@ -2208,6 +2228,7 @@ pub const DynamicLinker = struct { .ps3, .ps4, .ps5, + .vita, => .none, }; } @@ -2579,6 +2600,8 @@ pub const DynamicLinker = struct { .@"3ds", + .vita, + .emscripten, .wasi, @@ -3111,6 +3134,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 { .longlong, .ulonglong, .double => return 64, .longdouble => return 80, }, + .vita => switch (c_type) { + .char => return 8, + .short, .ushort => return 16, + .int, .uint, .float => return 32, + .long, .ulong => return 64, + .longlong, .ulonglong, .double, .longdouble => return 64, + }, .ps3, .contiki, |
