mlugg
0fe3fd01dd
std: update std.builtin.Type fields to follow naming conventions
...
The compiler actually doesn't need any functional changes for this: Sema
does reification based on the tag indices of `std.builtin.Type` already!
So, no zig1.wasm update is necessary.
This change is necessary to disallow name clashes between fields and
decls on a type, which is a prerequisite of #9938 .
2024-08-28 08:39:59 +01:00
Alex Rønne Petersen
6db9ad7798
std.Target: Return the correct value for 32-bit sparc v9 in toElfMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
9b5c992d31
std.Target: Return the correct value for elfiamcu in toElfMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
550438653d
std.Target: Pull toCoffMachine()/toElfMachine() up from Arch to Target.
...
This enables them to give more correct results.
Contributes to #20771 .
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
b01c595d4a
std.coff: Capitalize MachineType.{Unknown,Thumb} for consistency.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
65affb1c22
std.Target: Don't match PowerPC in Arch.toCoffMachine().
...
It's entirely unclear whether this should map to POWERPC or POWERPCFP, and as I
can find no evidence of people producing PE files for PowerPC since Windows NT,
let's just not make a likely-wrong guess. We can revisit this if the need ever
actually arises.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
b24fc35eeb
std.Target: Don't match big endian architectures in Arch.toCoffMachine().
...
All of these were mapping to types that are little endian. In fact, I can find
no evidence that either Windows or UEFI have ever been used on big endian
systems.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
8516a6ab57
std.Target: Clean up Arch.toCoffMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
490b328127
std.Target: Fix Arch.toElfMachine() for mips.
...
EM_MIPS_RS3_LE is obsolete; all mips targets just use EM_MIPS.
Also, fun fact: EM_MIPS_RS3_LE is actually big endian!
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
6c27cab5b3
std.Target: Fix Arch.toElfMachine() for arc.
...
The arc tag means ARCv2.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
9246c88031
std.Target: Clean up Arch.toElfMachine().
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
1e67221f07
std.Target: Change requiresLibC() to return true for aix.
...
AIX does not have a stable syscall interface; libc is required.
2024-08-15 10:55:46 +02:00
Alex Rønne Petersen
fc93ab7182
std.Target: Fix isGnuLibC() to handle hurd too.
2024-08-15 10:55:45 +02:00
Alex Rønne Petersen
0def4e0db0
std.Target: Make some functions handle driverkit alongside other Apple OSs.
...
Reference for versions: https://developer.apple.com/support/xcode
2024-08-15 10:55:45 +02:00
Andrew Kelley
78fb9c0a17
Merge pull request #21031 from linusg/std-target-naming
...
std.Target: Function naming cleanup
2024-08-14 10:36:24 -07:00
Alex Rønne Petersen
d6f9972594
all: Handle spirv in addition to spirv(32,64) where applicable.
...
Some of this is arbitrary since spirv (as opposed to spirv32/spirv64) refers to
the version with logical memory layout, i.e. no 'real' pointers. This change at
least matches what clang does.
2024-08-12 16:08:28 -07:00
Alex Rønne Petersen
8af4d65108
std.Target: Remove liteos OS tag.
...
It has not seen development in 4 years.
https://github.com/LiteOS/LiteOS/commits/master
2024-08-12 08:59:49 +02:00
Alex Rønne Petersen
e211dce6fc
std.Target: Remove minix OS tag.
...
It has not seen development in 6 years. RIP.
* https://github.com/Stichting-MINIX-Research-Foundation/minix/commits/master
* https://groups.google.com/g/minix3/c/nUG1NwxXXkg
2024-08-12 08:59:49 +02:00
Alex Rønne Petersen
4d4a023042
std.Target: Remove no longer relevant TODO about SPIR-V ABIs.
2024-08-12 08:59:49 +02:00
Alex Rønne Petersen
eb4539a27d
std.Target: Rename glsl450 Arch tag to opengl.
...
Versions can simply use the normal version range mechanism, or alternatively an
Abi tag if that makes more sense. For now, we only care about 4.5 anyway.
2024-08-12 08:59:47 +02:00
Alex Rønne Petersen
15a3ee1979
std.Target: Remove supportsNewStackCall().
...
This is literally just isWasm() and has no uses in the repository.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
0bb9db3998
std.Target: Add comments explaining the baseline CPUs for hexagon/s390x.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
7f7008b5b2
std.Target: Sort Os tags in a hopefully more sensible way.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
60bf1a6543
std.Target: Sort Arch tags in a hopefully more sensible way.
2024-08-12 08:57:10 +02:00
Alex Rønne Petersen
25096ed893
std.Target: Some corrections and additions to stackAlignment().
...
Sourced from LLVM and GCC backends and ABI documents.
2024-08-11 20:28:29 -07:00
Andrew Kelley
61dac74128
Merge pull request #20985 from alexrp/gpu-nonsense
...
Follow-up on `std.Target` GPU changes in #20960
2024-08-11 20:23:28 -07:00
Alex Rønne Petersen
6316fd9535
std.Target: Add goff and xcoff to ObjectFormat.
...
Also improve the docs a bit, and handle driverkit and dxil in default().
2024-08-11 20:21:28 -07:00
Linus Groh
4ef956ef14
std.Target: Rename c_type_* functions to camel case
...
From https://ziglang.org/documentation/master/#Names :
> If `x` is otherwise callable, then `x` should be `camelCase`.
2024-08-12 00:36:51 +01:00
Linus Groh
fd434fcd38
std.Target: Rename feature_set_fns to FeatureSetFns
...
From https://ziglang.org/documentation/master/#Names :
> If `x` is callable, and `x`'s return type is `type`, then `x` should
> be `TitleCase`.
2024-08-12 00:34:59 +01:00
Alex Rønne Petersen
8f917870a6
std.Target: Bump maximum supported versions of all Apple OSs.
...
https://support.apple.com/en-us/HT201222
2024-08-10 20:24:22 +02:00
Alex Rønne Petersen
b99777940e
std.Target: Bump maximum supported OpenBSD version to 7.5.
2024-08-10 20:24:21 +02:00
Alex Rønne Petersen
d7e19f7f8e
std.Target: Bump minimum supported OpenBSD version to 7.3.
...
Per 0.13.0 release notes: https://ziglang.org/download/0.13.0/release-notes.html#Tier-2-Support
2024-08-10 20:24:20 +02:00
Alex Rønne Petersen
8088027e72
std.Target: Bump minimum supported Windows version to win10.
...
Per 0.13.0 release notes: https://ziglang.org/download/0.13.0/release-notes.html
2024-08-10 20:24:19 +02:00
Alex Rønne Petersen
fa51e84a87
std.Target: Use Solaris version instead of SunOS version for solaris OS tag.
...
The latter is not a very useful number: https://en.wikipedia.org/wiki/Oracle_Solaris#Version_history
2024-08-10 20:24:18 +02:00
Alex Rønne Petersen
10949a6914
std.Target: Update default max Linux version to 6.10.3.
2024-08-09 00:34:54 +02:00
Alex Rønne Petersen
bf47cb4379
std.Target: Fix C type alignment calculation for spirv.
2024-08-08 02:41:17 +02:00
Alex Rønne Petersen
1b6b8813cf
Revert "std.Target: Fix ptrBitWidth_cpu_abi() for dxil (64-bit, not 32-bit)."
...
This reverts commit ab154be7f0a89b271686d740f7e50545414a6024.
2024-08-08 02:03:17 +02:00
Alex Rønne Petersen
d415efd68f
Revert "std.Target: Fix C type alignment calculation for dxil."
...
This reverts commit e67388c2e538789aa3e46f625f6e08696093dcdb.
2024-08-08 02:02:50 +02:00
Alex Rønne Petersen
ecf2069e30
Revert "std.Target: Fix C long long size for opencl (8, not 16)."
...
This reverts commit 606d011acf8c2a75ea1485174c2c1d24a612c86b.
2024-08-08 02:02:33 +02:00
Alex Rønne Petersen
93e983489b
Revert "std.Target: Fix C long double size for opencl (8, not 16)."
...
This reverts commit a1d3e567635e79e0fbd8d56225d5098bc6cb8bbb.
2024-08-08 02:02:22 +02:00
Alex Rønne Petersen
1e1cd1f02c
Revert "std.Target: Fix C long double size for amdhsa, amdpal, and mesa3d (8, not 16)."
...
This reverts commit eef499812c37112f4b03bde73a632c23ca753d20.
2024-08-08 02:02:11 +02:00
Andrew Kelley
cd5f673cae
Merge pull request #20909 from alexrp/glibc-riscv
...
Support building glibc for riscv32/riscv64
2024-08-07 01:14:54 -07:00
Andrew Kelley
b071b10ce8
Merge pull request #20894 from alexrp/target-cleanup-4
...
`std.Target`: Minor rework to some `isArch()` functions, fix some related issues throughout `std`
2024-08-07 01:08:44 -07:00
Alex Rønne Petersen
00097c3bb8
std.Target: Some corrections and additions to charSignedness().
...
Sourced from GCC backends and some manual testing with clang.
2024-08-07 00:56:02 -07:00
Alex Rønne Petersen
ef502daafe
std.Target: Handle mesa3d in c_type_bit_size().
2024-08-06 20:17:03 +02:00
Alex Rønne Petersen
23b5a6c71e
std.Target: Treat spirv as identical to spirv64 for ABI size/alignment purposes.
...
This is arbitrary since spirv (as opposed to spirv32/spirv64) refers to the
version with logical memory layout, i.e. no 'real' pointers. This change at
least matches what clang does.
2024-08-06 20:17:03 +02:00
Alex Rønne Petersen
231f322a65
std.Target: Fix C long double size for ve (16, not 8).
2024-08-06 20:17:03 +02:00
Alex Rønne Petersen
7b47ebe576
std.Target: Fix C long double size for sparc32 (8, not 16).
2024-08-06 20:17:03 +02:00
Alex Rønne Petersen
eef499812c
std.Target: Fix C long double size for amdhsa, amdpal, and mesa3d (8, not 16).
2024-08-06 20:17:03 +02:00
Alex Rønne Petersen
a1d3e56763
std.Target: Fix C long double size for opencl (8, not 16).
...
This value was correct for the old SPIR, but not for SPIR-V.
2024-08-06 20:17:03 +02:00