zig
zig copied to clipboard
stage 2: Update `CType` size/alignment
These updates were made by testing all supported arch-OS-ABI combinations against the sizeof
/_Alignof
reported by Clang and correcting any discrepancies. There's bound to be some incorrect entries in here where Clang's support for a target is limited (i386-android is a recent example), but this should be a good start.
One interesting discovery along the way is that there are 32-bit ABI's for 64-bit architectures where void *
is 32-bits: gnux32, muslx32, and gnuabin32. (This PR does nothing to support those)
P.S. Here's the full test.
I'm surprised by the linker errors. Are we perhaps missing custom re-exports with renames of globals in compiler-rt for some 32bit targets?
I'm surprised by the linker errors. Are we perhaps missing custom re-exports with renames of globals in compiler-rt for some 32bit targets?
The problem is that on PPC, we only export "PPC-style" symbol names but the Zig LLVM backend lowers softfloat calls to the standard compiler-rt names. I ran into the same problem on https://github.com/ziglang/zig/pull/13100
Assuming it sounds alright to you, the simplest fix is just to re-export the symbols under both names.
I'm surprised by the linker errors. Are we perhaps missing custom re-exports with renames of globals in compiler-rt for some 32bit targets?
The problem is that on PPC, we only export "PPC-style" symbol names but the Zig LLVM backend lowers softfloat calls to the standard compiler-rt names. I ran into the same problem on #13100
Assuming it sounds alright to you, the simplest fix is just to re-export the symbols under both names.
Yep, my thinking exactly!