ziglang/zig
263
5.9k
Fork
You've already forked zig
760

std.Target: Add wiiu target information #35339

Manually merged
alexrp merged 1 commit from :osdever-wiiu-target into master 2026年06月17日 22:45:46 +02:00
Contributor
Copy link

I based this off the 3DS PR

I based this off the [3DS PR](https://github.com/ziglang/zig/pull/24938)
@ -248,6 +248,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
.psp,
.tios,
.vita,
.wiiu
Contributor
Copy link

You missed the comma here

You missed the comma here
Author
Contributor
Copy link

fixed in 326ec5b1d9

fixed in 326ec5b1d9
ARandomOSDever marked this conversation as resolved
@ -621,0 +623,4 @@
.wiiu=>.{
.semver=.{
.min=.{.major=5,.minor=5,.patch=5},// Latest global release
.max=.{.major=5,.minor=5,.patch=6},// Latest US only release
Owner
Copy link

Where are these versions sourced from?

Where are these versions sourced from?
Author
Contributor
Copy link

The OS settings menu, there also is a OS function call (MCP_GetSystemVersion) to get it

The OS settings menu, there also is a OS function call ([MCP_GetSystemVersion](https://wut.devkitpro.org/group__coreinit__mcp.html#ga0088038f9141cdc7932f61359dd5f6d3)) to get it
ARandomOSDever marked this conversation as resolved
@ -2074,1 +2084,4 @@
.nvptx,.nvptx64=>&nvptx.cpu.sm_52,
.powerpc=>switch(os.tag){
.wiiu=>&powerpc.cpu.@"750",
else=>&powerpc.cpu.ppc,
Owner
Copy link

This prong should just do generic(arch).

This prong should just do `generic(arch)`.
alexrp marked this conversation as resolved
@ -3391,0 +3409,4 @@
.char=>return8,
.short,.ushort=>return16,
.int,.uint,.float,.long,.ulong=>return32,
.longlong,.ulonglong,.double,.longdouble=>return64,
Owner
Copy link

Can you please verify long double size somehow? This being PowerPC, the long double story is not necessarily straightforward (#30976).

Can you please verify `long double` size somehow? This being PowerPC, the `long double` story is not necessarily straightforward (https://codeberg.org/ziglang/zig/issues/30976).
Author
Contributor
Copy link

According to $DEVKITPPC/bin/powerpc-eabi-gcc -dM -E - < /dev/null | grep SIZEOF_LONG_DOUBLE: #define __SIZEOF_LONG_DOUBLE__ 8 so long double is 64 bits

According to `$DEVKITPPC/bin/powerpc-eabi-gcc -dM -E - < /dev/null | grep SIZEOF_LONG_DOUBLE`: `#define __SIZEOF_LONG_DOUBLE__ 8` so `long double` is 64 bits
ARandomOSDever marked this conversation as resolved
@ -6343,6 +6343,7 @@ fn addCommonCCArgs(
.illumos=>tryargv.append("__illumos__"),
// Homebrew targets without LLVM support; use communities's preferred macros.
.@"3ds"=>tryargv.append("-D__3DS__"),
.wiiu=>tryargv.append("-D__WIIU__"),
Owner
Copy link

Is this macro established by any homebrew toolchain or similar?

Is this macro established by any homebrew toolchain or similar?
Author
Contributor
Copy link

Yes

[Yes](https://github.com/devkitPro/wut/blob/00ced9979974643b419aa9c6c61a5dbe41be55a4/Makefile#L45)
ARandomOSDever marked this conversation as resolved

Also needs to be handled here:

.other,.freestanding,.@"3ds",.psp,.vita=>{},
.freestanding,.other,.@"3ds",.vita=>{
Also needs to be handled here: https://codeberg.org/ziglang/zig/src/commit/3a6ddce4cf303d7a2bb618223043898d7b1bcc49/lib/std/start.zig#L73 https://codeberg.org/ziglang/zig/src/commit/3a6ddce4cf303d7a2bb618223043898d7b1bcc49/lib/std/debug.zig#L498

Just needs a rebase to be mergeable.

Just needs a rebase to be mergeable.
ARandomOSDever force-pushed osdever-wiiu-target from 2ff39ef9a3
Some checks failed
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / x86_64-netbsd-debug (pull_request) Has been cancelled
ci / x86_64-netbsd-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-openbsd-release (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / x86_64-freebsd-debug (pull_request) Has been cancelled
ci / x86_64-freebsd-release (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / aarch64-macos-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
to a5c5a9f86f
Some checks failed
ci / x86_64-netbsd-release (pull_request) Successful in 43m49s
ci / x86_64-freebsd-debug (pull_request) Successful in 47m24s
ci / x86_64-netbsd-debug (pull_request) Successful in 47m42s
ci / x86_64-freebsd-release (pull_request) Successful in 50m21s
ci / aarch64-macos-release (pull_request) Successful in 54m38s
ci / x86_64-windows-release (pull_request) Successful in 1h1m20s
ci / x86_64-windows-debug (pull_request) Successful in 1h2m18s
ci / x86_64-openbsd-release (pull_request) Successful in 1h2m47s
ci / aarch64-macos-debug (pull_request) Successful in 1h7m42s
ci / x86_64-openbsd-debug (pull_request) Successful in 1h7m7s
ci / x86_64-linux-debug (pull_request) Successful in 1h10m26s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
2026年06月06日 11:45:19 +02:00
Compare
Contributor
Copy link

Damn, never would have thought that adding a new target could result in so many changes.

@ARandomOSDever You should probably rebase the branch a bit more carefully...

Damn, never would have thought that adding a new target could result in so many changes. @ARandomOSDever You should probably rebase the branch a bit more carefully...
Author
Contributor
Copy link

yeah, seems like I messed up my rebase
I feel like the simplest way to continue is to recreate the PR

yeah, seems like I messed up my rebase I feel like the simplest way to continue is to recreate the PR
Contributor
Copy link

@ARandomOSDever wrote in #35339 (comment):

yeah, seems like I messed up my rebase I feel like the simplest way to continue is to recreate the PR

I mean, not really? I see this a lot in OSS, but you just have to create a clean branch, cherry pick your commits, associate it with this one and force push. But yeah, feel free to do whatever.

@ARandomOSDever wrote in https://codeberg.org/ziglang/zig/pulls/35339#issuecomment-16670609: > yeah, seems like I messed up my rebase I feel like the simplest way to continue is to recreate the PR I mean, not really? I see this a lot in OSS, but you just have to create a clean branch, cherry pick your commits, associate it with this one and force push. But yeah, feel free to do whatever.
Author
Contributor
Copy link

I can't reopen this PR (it autoclosed), will create a new one
Edit: I cant create a new PR (it gives me the HTTP 500 error), will try later

I can't reopen this PR (it autoclosed), will create a new one Edit: I cant create a new PR (it gives me the HTTP 500 error), will try later
alexrp reopened this pull request 2026年06月07日 19:17:49 +02:00

Feel free to rebase this PR or create a new one. The 500 error on PRs should be resolved.

Feel free to rebase this PR or create a new one. The 500 error on PRs should be resolved.
ARandomOSDever force-pushed osdever-wiiu-target from b53aa56d24
Some checks failed
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / x86_64-macos-release (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / aarch64-macos-release (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
to 20b3aa3bcd
Some checks failed
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
ci / x86_64-openbsd-release (pull_request) Has been cancelled
ci / x86_64-freebsd-debug (pull_request) Has been cancelled
ci / x86_64-linux-release (pull_request) Has been cancelled
ci / aarch64-linux-release (pull_request) Has been cancelled
ci / x86_64-linux-debug-llvm (pull_request) Has been cancelled
ci / x86_64-linux-debug (pull_request) Has been cancelled
ci / x86_64-netbsd-release (pull_request) Has been cancelled
ci / x86_64-windows-release (pull_request) Has been cancelled
ci / x86_64-windows-debug (pull_request) Has been cancelled
ci / x86_64-netbsd-debug (pull_request) Has been cancelled
ci / x86_64-openbsd-debug (pull_request) Has been cancelled
ci / x86_64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-linux-debug (pull_request) Has been cancelled
ci / aarch64-macos-debug (pull_request) Has been cancelled
ci / s390x-linux-release (pull_request) Has been cancelled
ci / aarch64-macos-release (pull_request) Has been cancelled
ci / s390x-linux-debug (pull_request) Has been cancelled
ci / powerpc64le-linux-release (pull_request) Has been cancelled
ci / powerpc64le-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (push) Successful in 2h11m29s
ci / loongarch64-linux-debug (push) Successful in 3h26m12s
ci / aarch64-freebsd-debug (push) Successful in 5h15m49s
ci / aarch64-freebsd-release (push) Successful in 4h2m51s
ci / aarch64-netbsd-debug (push) Successful in 5h28m36s
ci / aarch64-netbsd-release (push) Successful in 3h25m53s
ci / riscv64-linux-debug (push) Has been cancelled
ci / riscv64-linux-release (push) Has been cancelled
2026年06月08日 17:19:19 +02:00
Compare
wiiu target: add wiiu target
Some checks failed
ci / x86_64-netbsd-release (pull_request) Failing after 24m56s
ci / x86_64-freebsd-release (pull_request) Failing after 30m19s
ci / aarch64-macos-release (pull_request) Failing after 44m3s
ci / x86_64-freebsd-debug (pull_request) Failing after 49m41s
ci / x86_64-netbsd-debug (pull_request) Failing after 50m49s
ci / x86_64-linux-debug (pull_request) Failing after 54m44s
ci / x86_64-windows-release (pull_request) Failing after 55m31s
ci / x86_64-openbsd-debug (pull_request) Failing after 59m54s
ci / x86_64-openbsd-release (pull_request) Failing after 1h3m11s
ci / aarch64-macos-debug (pull_request) Failing after 1h10m9s
ci / aarch64-linux-release (pull_request) Failing after 1h26m38s
ci / s390x-linux-release (pull_request) Failing after 1h27m57s
ci / x86_64-windows-debug (pull_request) Failing after 1h29m14s
ci / aarch64-linux-debug (pull_request) Failing after 1h47m7s
ci / powerpc64le-linux-release (pull_request) Failing after 1h54m32s
ci / s390x-linux-debug (pull_request) Failing after 2h28m57s
ci / powerpc64le-linux-debug (pull_request) Failing after 2h54m18s
ci / x86_64-linux-release (pull_request) Failing after 3h10m41s
ci / x86_64-linux-debug-llvm (pull_request) Failing after 3h19m16s
ci / aarch64-freebsd-debug (pull_request) Has been cancelled
ci / aarch64-freebsd-release (pull_request) Has been cancelled
ci / aarch64-netbsd-debug (pull_request) Has been cancelled
ci / aarch64-netbsd-release (pull_request) Has been cancelled
ci / loongarch64-linux-debug (pull_request) Has been cancelled
ci / loongarch64-linux-release (pull_request) Has been cancelled
ci / riscv64-linux-debug (pull_request) Has been cancelled
ci / riscv64-linux-release (pull_request) Has been cancelled
b533170e4f
@ -622,6 +624,13 @@ pub const Os = struct {
},
},
.wiiu=>.{
Contributor
Copy link

Formatting

Formatting
alexrp marked this conversation as resolved
@ -3419,6 +3432,13 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {
.longlong,.ulonglong,.double,.longdouble=>return64,
},
.wiiu=>switch(c_type){
Contributor
Copy link

Ditto

Ditto
alexrp marked this conversation as resolved
alexrp manually merged commit eedf7d9299 into master 2026年06月17日 22:45:25 +02:00
alexrp removed their assignment 2026年06月17日 22:53:29 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
abi/f32
abi/ilp32
abi/sf
accepted
This proposal is planned.
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
The web application for interactive documentation and generation of its assets.
backend/c
The C backend outputs C source code.
backend/llvm
The LLVM backend outputs an LLVM bitcode module.
backend/self-hosted
The self-hosted backends produce machine code directly.
binutils
Zig's included binary utilities: zig ar, zig dlltool, zig lib, zig ranlib, zig objcopy, and zig rc.
breaking
Implementing this issue could cause existing code to no longer compile or have different behavior.
build system
The Zig build system - zig build, std.Build, the build runner, and package management.
debug info
An issue related to debug information (e.g. DWARF) produced by the Zig compiler.
docs
An issue with documentation, e.g. the language reference or standard library doc comments.
error message
This issue points out an error message that is unhelpful and should be improved.
frontend
Tokenization, parsing, AstGen, ZonGen, Sema, Legalize, and Liveness.
fuzzing
An issue related to Zig's integrated fuzz testing.
incremental
Reuse of internal compiler state for faster compilation.
lib/c
This issue relates to Zig's libc implementation and/or vendored libcs.
lib/compiler-rt
This issue relates to Zig's compiler-rt library.
lib/cxx
This issue relates to Zig's vendored libc++ and/or libc++abi.
lib/std
This issue relates to Zig's standard library.
lib/tsan
This issue relates to Zig's vendored libtsan.
lib/ubsan-rt
This issue relates to Zig's ubsan-rt library.
lib/unwind
This issue relates to Zig's vendored libunwind.
linking
Zig's integrated object file and incremental linker.
miscompilation
The compiler reports success but produces semantically incorrect code.
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
This issue suggests language modifications. If it also has the "accepted" label then it is planned.
release notes
This issue or pull request should be mentioned in the release notes.
testing
This issue is related to testing the compiler, standard library, or other parts of Zig.
zig cc
Zig as a drop-in C-family compiler.
zig fmt
The Zig source code formatter.
zig reduce
The Zig source code reduction tool.
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
use case
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig!35339
Reference in a new issue
ziglang/zig
No description provided.
Delete branch ":osdever-wiiu-target"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?