mirror of
https://github.com/ziglang/zig.git
synced 2025-12-31 02:23:22 +00:00
make --target-os freestanding work
This commit is contained in:
parent
0cf0739b0a
commit
cd7713b178
@ -433,7 +433,22 @@ static int get_arch_pointer_bit_width(ZigLLVM_ArchType arch) {
|
||||
int get_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
|
||||
switch (target->os) {
|
||||
case ZigLLVM_UnknownOS:
|
||||
zig_unreachable();
|
||||
switch (id) {
|
||||
case CIntTypeShort:
|
||||
case CIntTypeUShort:
|
||||
return 16;
|
||||
case CIntTypeInt:
|
||||
case CIntTypeUInt:
|
||||
return 32;
|
||||
case CIntTypeLong:
|
||||
case CIntTypeULong:
|
||||
return get_arch_pointer_bit_width(target->arch.arch);
|
||||
case CIntTypeLongLong:
|
||||
case CIntTypeULongLong:
|
||||
return 64;
|
||||
case CIntTypeCount:
|
||||
zig_unreachable();
|
||||
}
|
||||
case ZigLLVM_Linux:
|
||||
case ZigLLVM_Darwin:
|
||||
switch (id) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user