aboutsummaryrefslogtreecommitdiff
path: root/test/llvm_targets.zig
AgeCommit message (Collapse)Author
2025-10-31test: remove some unsupported x86_64 darwin targets from llvm_targetsAlex Rønne Petersen
2025-10-29remove all IBM AIX and z/OS supportAlex Rønne Petersen
As with Solaris (dba1bf935390ddb0184a4dc72245454de6c06fd2), we have no way to actually audit contributions for these OSs. IBM also makes it even harder than Oracle to actually obtain these OSs. closes #23695 closes #23694 closes #3655 closes #23693
2025-10-27remove all Oracle Solaris supportAlex Rønne Petersen
There is no straightforward way for the Zig team to access the Solaris system headers; to do this, one has to create an Oracle account, accept their EULA to download the installer ISO, and finally install it on a machine or VM. We do not have to jump through hoops like this for any other OS that we support, and no one on the team has expressed willingness to do it. As a result, we cannot audit any Solaris contributions to std.c or other similarly sensitive parts of the standard library. The best we would be able to do is assume that Solaris and illumos are 100% compatible with no way to verify that assumption. But at that point, the solaris and illumos OS tags would be functionally identical anyway. For Solaris especially, any contributions that involve APIs introduced after the OS was made closed-source would also be inherently more risky than equivalent contributions for other proprietary OSs due to the case of Google LLC v. Oracle America, Inc., wherein Oracle clearly demonstrated its willingness to pursue legal action against entities that merely copy API declarations. Finally, Oracle laid off most of the Solaris team in 2017; the OS has been in maintenance mode since, presumably to be retired completely sometime in the 2030s. For these reasons, this commit removes all Oracle Solaris support. Anyone who still wishes to use Zig on Solaris can try their luck by simply using illumos instead of solaris in target triples - chances are it'll work. But there will be no effort from the Zig team to support this use case; we recommend that people move to illumos instead.
2025-08-26std.Target: add vita osMaciej 'vesim' Kuliński
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-08-25start adding big endian RISC-V supportAlex Rønne Petersen
The big endian RISC-V effort is mostly driven by MIPS (the company) which is pivoting to RISC-V, and presumably needs a big endian variant to fill the niche that big endian MIPS (the ISA) did. GCC already supports these targets, but LLVM support will only appear in 22; this commit just adds the necessary target knowledge and checks on our end.
2025-08-22test(llvm_targets): remove unused thumb-3dsGasInfinity
2025-08-22feat(std.Target): add 3ds osGasInfinity
2025-05-29test: Remove x86-freebsd-none and powerpc-freebsd-eabihf from llvm_targets.Alex Rønne Petersen
These will be dropped in FreeBSD 15.0, so there's no point in us spending resources these now.
2025-05-17test: Remove some nonsensical NetBSD targets from llvm_targets.Alex Rønne Petersen
* mips64/mips64el on NetBSD are soft float; we have no support for this yet. * powerpc64 does not appear to be a thing. * riscv32/riscv64 have not seen official releases yet.
2025-05-11test: Add {powerpc64,riscv32}-netbsd-none to llvm_targets.Alex Rønne Petersen
2025-05-10test: Remove some nonsensical FreeBSD targets from llvm_targets.Alex Rønne Petersen
2025-04-28Merge pull request #23698 from alexrp/goff-xcoff-stubsAlex Rønne Petersen
`link`: Stub out GOFF/XCOFF linker code based on LLVM
2025-04-28Merge pull request #23663 from alexrp/emit-asm-onlyAlex Rønne Petersen
2025-04-28std.Target: Remove Os.Tag.elfiamcu.Alex Rønne Petersen
The last Intel Quark MCU was released in 2015. Quark was announced to be EOL in 2019, and stopped shipping entirely in 2022. The OS tag was only meaningful for Intel's weird fork of Linux 3.8.7 with a special ABI that differs from the regular i386 System V ABI; beyond that, the CPU itself is just a plain old P54C (i586). We of course keep support for the CPU itself, just not Intel's Linux fork.
2025-04-27test: Uncomment a bunch of targets in llvm_targets.Alex Rønne Petersen
2025-04-27test: Add powerpc(64)-aix to llvm_targets.Alex Rønne Petersen
2025-04-27test: Remove sparc(64)-illumos from llvm_targets.Alex Rønne Petersen
Illumos dropped support for SPARC many years ago.
2025-04-27test: Remove sparc-solaris and x86-solaris from llvm_targets.Alex Rønne Petersen
These are no longer supported.
2025-04-27test: Remove some thumb(eb)-*-* targets from llvm_targets.Alex Rønne Petersen
There is no evidence that these operating systems support pure Thumb, not even just in userland.
2025-04-27test: Remove mips(64)(el)-freebsd targets from llvm_targets.Alex Rønne Petersen
These were dropped in FreeBSD 14 and we're not going to add e.g. libc support for them anyway, so they're effectively dead to us.
2025-04-06test: Remove some dead FreeBSD targets from llvm_targets.Alex Rønne Petersen
These were dropped in FreeBSD 12.x, and we now require 13.4+.
2025-04-04std.Target: Add Abi.muslf32 and Abi.muslsf.Alex Rønne Petersen
2024-12-03std.Target: Remove Os.Tag.bridgeos.Alex Rønne Petersen
It doesn't appear that targeting bridgeOS is meaningfully supported by Apple. Even LLVM/Clang appear to have incomplete support for it, suggesting that Apple never bothered to upstream that support. So there's really no sense in us pretending to support this.
2024-11-28test: Change llvm_targets to actually emit an object for each target.Alex Rønne Petersen
Without doing this, we don't actually test whether the data layout string we generate matches LLVM's. A number of targets had to be commented out due to this change: * Some are using a non-working experimental LLVM backend (arc, csky, ...). * Some don't have working LLD support (lanai, sparc, ...). * Some don't have working self-hosted linker support (nvptx). * Some are using ABIs that haven't been standardized (loongarch32). Finally, all non-x86 uefi targets are hopelessly broken and can't really be fixed until we change our emit logic to lower *-uefi-* verbatim rather than to *-windows-*. See: https://github.com/ziglang/zig/issues/21630
2024-11-28test: Remove aarch64(_be)-linux-gnuilp32 from llvm_targets.Alex Rønne Petersen
LLVM doesn't handle this target correctly (pointer size, etc).
2024-11-28test: Add m68k-linux-musl to llvm_targets.Alex Rønne Petersen
2024-11-28test: Add aarch64(_be)-linux-musl to llvm_targets.Alex Rønne Petersen
2024-11-28test: Remove aarch64-rtems-ilp32 from llvm_targets.Alex Rønne Petersen
LLVM can't represent this target at the moment.
2024-11-28test: Add *-windows-cygnus triples to llvm_targets.Alex Rønne Petersen
2024-11-04test: Remove some unsupported ohos triples from llvm_targets.Alex Rønne Petersen
2024-11-02std.zig.target: Change mips64(el)-linux-musl triples to -muslabi64.Alex Rønne Petersen
With this, MIPS triples for musl are in line with glibc triples.
2024-11-02std.Target: Add muslabin32 and muslabi64 tags to Abi.Alex Rønne Petersen
Once we upgrade to LLVM 20, these should be lowered verbatim rather than to simply musl. Similarly, the special case in llvmMachineAbi() should go away.
2024-10-26test: Add some missing android, haiku, illumos, solaris triples to llvm_targets.Alex Rønne Petersen
2024-10-16test: Remove some loongarch32 triples that were erroneously added to ↵Alex Rønne Petersen
llvm_targets. glibc and musl do not support loongarch32 yet.
2024-10-06test: Fix powerpc-aix-eabihf target triple in llvm_targets.Alex Rønne Petersen
2024-10-06test: Add some missing x86_64-linux-* triples to llvm_targets.Alex Rønne Petersen
2024-10-06test: Add android/androideabi triples to llvm_targets.Alex Rønne Petersen
2024-10-06test: Add ohos/ohoseabi triples to llvm_targets.Alex Rønne Petersen
2024-10-03test: Rewrite the target triple list for llvm_targets.Alex Rønne Petersen
This removes some triples that didn't really make sense (e.g. msp430-linux) and adds more exhaustive coverage of supported triples.
2024-08-12std.Target: Rename glsl450 Arch tag to opengl.Alex Rønne Petersen
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-07-30std.Target: Remove `sparcel` architecture tag.Alex Rønne Petersen
What is `sparcel`, you might ask? Good question! If you take a peek in the SPARC v8 manual, §2.2, it is quite explicit that SPARC v8 is a big-endian architecture. No little-endian or mixed-endian support to be found here. On the other hand, the SPARC v9 manual, in §3.2.1.2, states that it has support for mixed-endian operation, with big-endian mode being the default. Ok, so `sparcel` must just be referring to SPARC v9 running in little-endian mode, surely? Nope: * https://github.com/llvm/llvm-project/blob/40b4fd7a3e81d32b29364a1b15337bcf817659c0/llvm/lib/Target/Sparc/SparcTargetMachine.cpp#L226 * https://github.com/llvm/llvm-project/blob/40b4fd7a3e81d32b29364a1b15337bcf817659c0/llvm/lib/Target/Sparc/SparcTargetMachine.cpp#L104 So, `sparcel` in LLVM is referring to some sort of fantastical little-endian SPARC v8 architecture. I've scoured the internet and I can find absolutely no evidence that such a thing exists or has ever existed. In fact, I can find no evidence that a little-endian implementation of SPARC v9 ever existed, either. Or any SPARC version, actually! The support was added here: https://reviews.llvm.org/D8741 Notably, there is no mention whatsoever of what CPU this might be referring to, and no justification given for the "but some are little" comment added in the patch. My best guess is that this might have been some private exercise in creating a little-endian version of SPARC that never saw the light of day. Given that SPARC v8 explicitly doesn't support little-endian operation (let alone little-endian instruction encoding!), and no CPU is known to be implemented as such, I think it's very reasonable for us to just remove this support.
2024-07-28std.Target.Cpu.Arch: Remove the `aarch64_32` tag.Alex Rønne Petersen
This is a misfeature that we inherited from LLVM: * https://reviews.llvm.org/D61259 * https://reviews.llvm.org/D61939 (`aarch64_32` and `arm64_32` are equivalent.) I truly have no idea why this triple passed review in LLVM. It is, to date, the *only* tag in the architecture component that is not, in fact, an architecture. In reality, it is just an ILP32 ABI for AArch64 (*not* AArch32). The triples that use `aarch64_32` look like `aarch64_32-apple-watchos`. Yes, that triple is exactly what you think; it has no ABI component. They really, seriously did this. Since only Apple could come up with silliness like this, it should come as no surprise that no one else uses `aarch64_32`. Later on, a GNU ILP32 ABI for AArch64 was developed, and support was added to LLVM: * https://reviews.llvm.org/D94143 * https://reviews.llvm.org/D104931 Here, sanity seems to have prevailed, and a triple using this ABI looks like `aarch64-linux-gnu_ilp32` as you would expect. As can be seen from the diffs in this commit, there was plenty of confusion throughout the Zig codebase about what exactly `aarch64_32` was. So let's just remove it. In its place, we'll use `aarch64-watchos-ilp32`, `aarch64-linux-gnuilp32`, and so on. We'll then translate these appropriately when talking to LLVM. Hence, this commit adds the `ilp32` ABI tag (we already have `gnuilp32`).
2024-07-21std.Target: Remove the `r600` arch tag.Alex Rønne Petersen
These are quite old GPUs, and it is unlikely that Zig will ever be able to target them. See: https://en.wikipedia.org/wiki/Radeon_HD_2000_series
2024-05-09test/llvm_targets: add watchos, tvos and visionos to test matrixJakub Konka
2024-01-01rename std.zig.CrossTarget to std.Target.QueryAndrew Kelley
2024-01-01zig build system: change target, compilation, and module APIsAndrew Kelley
Introduce the concept of "target query" and "resolved target". A target query is what the user specifies, with some things left to default. A resolved target has the default things discovered and populated. In the future, std.zig.CrossTarget will be rename to std.Target.Query. Introduces `std.Build.resolveTargetQuery` to get from one to the other. The concept of `main_mod_path` is gone, no longer supported. You have to put the root source file at the module root now. * remove deprecated API * update build.zig for the breaking API changes in this branch * move std.Build.Step.Compile.BuildId to std.zig.BuildId * add more options to std.Build.ExecutableOptions, std.Build.ObjectOptions, std.Build.SharedLibraryOptions, std.Build.StaticLibraryOptions, and std.Build.TestOptions. * remove `std.Build.constructCMacro`. There is no use for this API. * deprecate `std.Build.Step.Compile.defineCMacro`. Instead, `std.Build.Module.addCMacro` is provided. - remove `std.Build.Step.Compile.defineCMacroRaw`. * deprecate `std.Build.Step.Compile.linkFrameworkNeeded` - use `std.Build.Module.linkFramework` * deprecate `std.Build.Step.Compile.linkFrameworkWeak` - use `std.Build.Module.linkFramework` * move more logic into `std.Build.Module` * allow `target` and `optimize` to be `null` when creating a Module. Along with other fields, those unspecified options will be inherited from parent `Module` when inserted into an import table. * the `target` field of `addExecutable` is now required. pass `b.host` to get the host target.
2023-08-01llvm: fix data layout calculation for experimental llvm targetsJacob Young
Closes #16616
2023-07-26llvm: fix data layout on iosJacob Young
Closes #16549
2023-07-23test: test for issues starting codegen on many targetsJacob Young
Specifically this is to make sure llvm data layout generation doesn't regress. The no emit bin is to allow testing targets that can't currently be linked. The commented out targets are ones that fail in the linker anyway when no emit bin is passed.