| author | |
| committer | |
| log | eedf7d92990676922ddbf1d2928d3d2a4d2e7487 |
| tree | 89203d2d19ca9e5fd0d11ac16aafa95ceb4e3636 |
| parent | dab794394ff816e892d757b4c7fe52958f14dfe9 |
| signature |
7 files changed, 29 insertions(+), 3 deletions(-)
lib/std/Build/Configuration.zig+3| ... | @@ -2584,6 +2584,7 @@ pub const TargetQuery = struct { | ... | @@ -2584,6 +2584,7 @@ pub const TargetQuery = struct { |
| 2584 | windows, | 2584 | windows, |
| 2585 | uefi, | 2585 | uefi, |
| 2586 | @"3ds", | 2586 | @"3ds", |
| 2587 | wiiu, | ||
| 2587 | ps3, | 2588 | ps3, |
| 2588 | ps4, | 2589 | ps4, |
| 2589 | ps5, | 2590 | ps5, |
| ... | @@ -2632,6 +2633,7 @@ pub const TargetQuery = struct { | ... | @@ -2632,6 +2633,7 @@ pub const TargetQuery = struct { |
| 2632 | .windows => .windows, | 2633 | .windows => .windows, |
| 2633 | .uefi => .uefi, | 2634 | .uefi => .uefi, |
| 2634 | .@"3ds" => .@"3ds", | 2635 | .@"3ds" => .@"3ds", |
| 2636 | .wiiu => .wiiu, | ||
| 2635 | .ps3 => .ps3, | 2637 | .ps3 => .ps3, |
| 2636 | .ps4 => .ps4, | 2638 | .ps4 => .ps4, |
| 2637 | .ps5 => .ps5, | 2639 | .ps5 => .ps5, |
| ... | @@ -2680,6 +2682,7 @@ pub const TargetQuery = struct { | ... | @@ -2680,6 +2682,7 @@ pub const TargetQuery = struct { |
| 2680 | .windows => .windows, | 2682 | .windows => .windows, |
| 2681 | .uefi => .uefi, | 2683 | .uefi => .uefi, |
| 2682 | .@"3ds" => .@"3ds", | 2684 | .@"3ds" => .@"3ds", |
| 2685 | .wiiu => .wiiu, | ||
| 2683 | .ps3 => .ps3, | 2686 | .ps3 => .ps3, |
| 2684 | .ps4 => .ps4, | 2687 | .ps4 => .ps4, |
| 2685 | .ps5 => .ps5, | 2688 | .ps5 => .ps5, |
lib/std/Target.zig+21-1| ... | @@ -49,6 +49,7 @@ pub const Os = struct { | ... | @@ -49,6 +49,7 @@ pub const Os = struct { |
| 49 | uefi, | 49 | uefi, |
| 50 | 50 | ||
| 51 | @"3ds", | 51 | @"3ds", |
| 52 | wiiu, | ||
| 52 | 53 | ||
| 53 | ps3, | 54 | ps3, |
| 54 | ps4, | 55 | ps4, |
| ... | @@ -196,6 +197,7 @@ pub const Os = struct { | ... | @@ -196,6 +197,7 @@ pub const Os = struct { |
| 196 | .uefi, | 197 | .uefi, |
| 197 | 198 | ||
| 198 | .@"3ds", | 199 | .@"3ds", |
| 200 | .wiiu, | ||
| 199 | 201 | ||
| 200 | .psp, | 202 | .psp, |
| 201 | .vita, | 203 | .vita, |
| ... | @@ -622,6 +624,13 @@ pub const Os = struct { | ... | @@ -622,6 +624,13 @@ pub const Os = struct { |
| 622 | }, | 624 | }, |
| 623 | }, | 625 | }, |
| 624 | 626 | ||
| 627 | .wiiu => .{ | ||
| 628 | .semver = .{ | ||
| 629 | .min = .{ .major = 5, .minor = 5, .patch = 5 }, // Latest global release | ||
| 630 | .max = .{ .major = 5, .minor = 5, .patch = 6 }, // Latest US only release | ||
| 631 | }, | ||
| 632 | }, | ||
| 633 | |||
| 625 | .psp => .{ | 634 | .psp => .{ |
| 626 | .semver = .{ | 635 | .semver = .{ |
| 627 | // https://www.psdevwiki.com/psp/Official_Firmware_(OFW)#1.XX_Kernel | 636 | // https://www.psdevwiki.com/psp/Official_Firmware_(OFW)#1.XX_Kernel |
| ... | @@ -933,6 +942,7 @@ pub const Abi = enum { | ... | @@ -933,6 +942,7 @@ pub const Abi = enum { |
| 933 | .windows => .gnu, | 942 | .windows => .gnu, |
| 934 | .uefi => .msvc, | 943 | .uefi => .msvc, |
| 935 | .@"3ds" => .eabihf, | 944 | .@"3ds" => .eabihf, |
| 945 | .wiiu => .eabihf, | ||
| 936 | .psp => .eabihf, | 946 | .psp => .eabihf, |
| 937 | .vita => .eabihf, | 947 | .vita => .eabihf, |
| 938 | .wasi, .emscripten => .musl, | 948 | .wasi, .emscripten => .musl, |
| ... | @@ -2093,7 +2103,7 @@ pub const Cpu = struct { | ... | @@ -2093,7 +2103,7 @@ pub const Cpu = struct { |
| 2093 | .msp430 => &msp430.cpu.msp430, | 2103 | .msp430 => &msp430.cpu.msp430, |
| 2094 | .nvptx, .nvptx64 => &nvptx.cpu.sm_52, | 2104 | .nvptx, .nvptx64 => &nvptx.cpu.sm_52, |
| 2095 | .powerpc => switch (os.tag) { | 2105 | .powerpc => switch (os.tag) { |
| 2096 | .openbsd => &powerpc.cpu.@"750", | 2106 | .openbsd, .wiiu => &powerpc.cpu.@"750", |
| 2097 | else => generic(arch), | 2107 | else => generic(arch), |
| 2098 | }, | 2108 | }, |
| 2099 | .powerpc64 => switch (os.tag) { | 2109 | .powerpc64 => switch (os.tag) { |
| ... | @@ -2298,6 +2308,7 @@ pub fn requiresLibC(target: *const Target) bool { | ... | @@ -2298,6 +2308,7 @@ pub fn requiresLibC(target: *const Target) bool { |
| 2298 | .other, | 2308 | .other, |
| 2299 | .@"3ds", | 2309 | .@"3ds", |
| 2300 | .tios, | 2310 | .tios, |
| 2311 | .wiiu, | ||
| 2301 | => false, | 2312 | => false, |
| 2302 | }; | 2313 | }; |
| 2303 | } | 2314 | } |
| ... | @@ -2444,6 +2455,7 @@ pub const DynamicLinker = struct { | ... | @@ -2444,6 +2455,7 @@ pub const DynamicLinker = struct { |
| 2444 | .windows, | 2455 | .windows, |
| 2445 | 2456 | ||
| 2446 | .@"3ds", | 2457 | .@"3ds", |
| 2458 | .wiiu, | ||
| 2447 | 2459 | ||
| 2448 | .emscripten, | 2460 | .emscripten, |
| 2449 | .wasi, | 2461 | .wasi, |
| ... | @@ -2866,6 +2878,7 @@ pub const DynamicLinker = struct { | ... | @@ -2866,6 +2878,7 @@ pub const DynamicLinker = struct { |
| 2866 | .windows, | 2878 | .windows, |
| 2867 | 2879 | ||
| 2868 | .@"3ds", | 2880 | .@"3ds", |
| 2881 | .wiiu, | ||
| 2869 | 2882 | ||
| 2870 | .psp, | 2883 | .psp, |
| 2871 | .vita, | 2884 | .vita, |
| ... | @@ -3422,6 +3435,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 { | ... | @@ -3422,6 +3435,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 { |
| 3422 | .longlong, .ulonglong, .double, .longdouble => return 64, | 3435 | .longlong, .ulonglong, .double, .longdouble => return 64, |
| 3423 | }, | 3436 | }, |
| 3424 | 3437 | ||
| 3438 | .wiiu => switch (c_type) { | ||
| 3439 | .char => return 8, | ||
| 3440 | .short, .ushort => return 16, | ||
| 3441 | .int, .uint, .float, .long, .ulong => return 32, | ||
| 3442 | .longlong, .ulonglong, .double, .longdouble => return 64, | ||
| 3443 | }, | ||
| 3444 | |||
| 3425 | .ps4, .ps5 => switch (c_type) { | 3445 | .ps4, .ps5 => switch (c_type) { |
| 3426 | .char => return 8, | 3446 | .char => return 8, |
| 3427 | .short, .ushort => return 16, | 3447 | .short, .ushort => return 16, |
lib/std/debug.zig+1-1| ... | @@ -501,7 +501,7 @@ pub fn defaultPanic(msg: []const u8, first_trace_addr: ?usize) noreturn { | ... | @@ -501,7 +501,7 @@ pub fn defaultPanic(msg: []const u8, first_trace_addr: ?usize) noreturn { |
| 501 | if (use_trap_panic) @trap(); | 501 | if (use_trap_panic) @trap(); |
| 502 | 502 | ||
| 503 | switch (builtin.os.tag) { | 503 | switch (builtin.os.tag) { |
| 504 | .freestanding, .other, .@"3ds", .psp, .vita => { | 504 | .freestanding, .other, .@"3ds", .wiiu, .psp, .vita => { |
| 505 | @trap(); | 505 | @trap(); |
| 506 | }, | 506 | }, |
| 507 | .uefi => { | 507 | .uefi => { |
lib/std/start.zig+1-1| ... | @@ -70,7 +70,7 @@ comptime { | ... | @@ -70,7 +70,7 @@ comptime { |
| 70 | // case it's not required to provide an entrypoint such as main. | 70 | // case it's not required to provide an entrypoint such as main. |
| 71 | if (!@hasDecl(root, start_sym_name) and @hasDecl(root, "main")) @export(&wasm_freestanding_start, .{ .name = start_sym_name }); | 71 | if (!@hasDecl(root, start_sym_name) and @hasDecl(root, "main")) @export(&wasm_freestanding_start, .{ .name = start_sym_name }); |
| 72 | } else switch (native_os) { | 72 | } else switch (native_os) { |
| 73 | .other, .freestanding, .@"3ds", .psp, .vita, .vulkan, .opengl, .opencl => {}, | 73 | .other, .freestanding, .@"3ds", .wiiu, .psp, .vita, .vulkan, .opengl, .opencl => {}, |
| 74 | else => if (!@hasDecl(root, start_sym_name)) @export(&_start, .{ .name = start_sym_name }), | 74 | else => if (!@hasDecl(root, start_sym_name)) @export(&_start, .{ .name = start_sym_name }), |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
src/Compilation.zig+1| ... | @@ -6353,6 +6353,7 @@ fn addCommonCCArgs( | ... | @@ -6353,6 +6353,7 @@ fn addCommonCCArgs( |
| 6353 | .serenity => try argv.append("__serenity__"), | 6353 | .serenity => try argv.append("__serenity__"), |
| 6354 | // Homebrew targets without LLVM support; use communities's preferred macros. | 6354 | // Homebrew targets without LLVM support; use communities's preferred macros. |
| 6355 | .@"3ds" => try argv.append("-D__3DS__"), | 6355 | .@"3ds" => try argv.append("-D__3DS__"), |
| 6356 | .wiiu => try argv.append("-D__WIIU__"), | ||
| 6356 | .psp => try argv.append("-D__PSP__"), | 6357 | .psp => try argv.append("-D__PSP__"), |
| 6357 | .vita => try argv.append("-D__vita__"), | 6358 | .vita => try argv.append("-D__vita__"), |
| 6358 | else => {}, | 6359 | else => {}, |
src/codegen/llvm.zig+1| ... | @@ -246,6 +246,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8 | ... | @@ -246,6 +246,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8 |
| 246 | .psp, | 246 | .psp, |
| 247 | .tios, | 247 | .tios, |
| 248 | .vita, | 248 | .vita, |
| 249 | .wiiu, | ||
| 249 | => "unknown", | 250 | => "unknown", |
| 250 | }; | 251 | }; |
| 251 | try llvm_triple.appendSlice(llvm_os); | 252 | try llvm_triple.appendSlice(llvm_os); |
test/llvm_targets.zig+1| ... | @@ -192,6 +192,7 @@ const targets = [_]std.Target.Query{ | ... | @@ -192,6 +192,7 @@ const targets = [_]std.Target.Query{ |
| 192 | .{ .cpu_arch = .powerpc, .os_tag = .openbsd, .abi = .eabihf }, | 192 | .{ .cpu_arch = .powerpc, .os_tag = .openbsd, .abi = .eabihf }, |
| 193 | .{ .cpu_arch = .powerpc, .os_tag = .rtems, .abi = .eabi }, | 193 | .{ .cpu_arch = .powerpc, .os_tag = .rtems, .abi = .eabi }, |
| 194 | .{ .cpu_arch = .powerpc, .os_tag = .rtems, .abi = .eabihf }, | 194 | .{ .cpu_arch = .powerpc, .os_tag = .rtems, .abi = .eabihf }, |
| 195 | .{ .cpu_arch = .powerpc, .os_tag = .wiiu, .abi = .eabihf }, | ||
| 195 | 196 | ||
| 196 | .{ .cpu_arch = .powerpcle, .os_tag = .freestanding, .abi = .eabi }, | 197 | .{ .cpu_arch = .powerpcle, .os_tag = .freestanding, .abi = .eabi }, |
| 197 | .{ .cpu_arch = .powerpcle, .os_tag = .freestanding, .abi = .eabihf }, | 198 | .{ .cpu_arch = .powerpcle, .os_tag = .freestanding, .abi = .eabihf }, |