aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Target.zig
AgeCommit message (Collapse)Author
2024-10-06std.Target: Fix cTypePreferredAlignment() to always return 1 for avr.Alex Rønne Petersen
This matches avr-gcc's ABI.
2024-10-06Merge pull request #21605 from alexrp/ohos-stuffAlex Rønne Petersen
`std.Target`: Introduce `Abi.ohoseabi` to distinguish the soft float case.
2024-10-05std.Target: Introduce Abi.ohoseabi to distinguish the soft float case.Alex Rønne Petersen
For the same reason as #21504.
2024-10-05std.Target: Rewrite DynamicLinker.standard() and fill in some missing details.Alex Rønne Petersen
2024-10-04std.Target: add missing propeller switch prongsAndrew Kelley
Seems to have been an invisible merge conflict.
2024-10-04Adds new cpu architectures propeller1 and propeller2. (#21563)Felix Queißner
* Adds new cpu architectures propeller1 and propeller2. These cpu architectures allow targeting the Parallax Propeller 1 and Propeller 2, which are both very special microcontrollers with 512 registers and 8 cpu cores. Resolves #21559 * Adds std.elf.EM.PROPELLER and std.elf.EM.PROPELLER2 * Fixes missing switch prongs in src/codegen/llvm.zig * Fixes order in std.Target.Arch --------- Co-authored-by: Felix "xq" Queißner <git@random-projects.net>
2024-10-04Merge pull request #21572 from alexrp/tests-llvm-targetsAlex Rønne Petersen
`test`: Rewrite the target triple list for `llvm_targets`.
2024-10-03Merge pull request #21570 from alexrp/windows-itaniumAlex Rønne Petersen
Initial port work for `*-windows-itanium` support.
2024-10-03std.Target: Remove Os.Tag.shadermodel.Alex Rønne Petersen
This was a leftover from the Cpu.Arch.dxil removal.
2024-10-03std.Target: Fix getVersionRangeTag() for bridgeos.Alex Rønne Petersen
Until we actually figure out a version range for this, we shouldn't classify this as using semver. Doing so results in a panic when trying to access the version range since it's not in fact a semver value.
2024-10-03std.Target: Fix Cpu.Model.generic() for arc, csky, and xtensa.Alex Rønne Petersen
Only targets for which we don't source CPU models/features from LLVM should use the fallback prong in this switch. Also make it exhaustive to catch similar mistakes in the future.
2024-10-03update_cpu_features: Don't delete the output file if there are no CPU features.Alex Rønne Petersen
At bare minimum, the compiler expects std.Target.<arch>.cpu.generic to work for any given architecture when generating the builtin module. So rather than try to hack that into working when the affected modules are omitted, just actually keep them. This affected lanai and xcore.
2024-10-03Merge pull request #21504 from alexrp/android-softfpAlex Rønne Petersen
`std.Target`: Introduce `Abi.androideabi` to distinguish the soft float case.
2024-09-28Initial port work for `*-windows-itanium` support.Alex Rønne Petersen
https://llvm.org/docs/HowToBuildWindowsItaniumPrograms.html This is a weird middle ground between `*-windows-gnu` and `*-windows-msvc`. It uses the C++ ABI of the former while using the system libraries of the latter.
2024-09-26std.Target: Return EM_ARC_COMPACT instead of EM_ARC_COMPACT2 for arc.Alex Rønne Petersen
Also fix an incorrect related comment in start.zig.
2024-09-26std.Target: Handle ve in toElfMachine().Alex Rønne Petersen
2024-09-24std.Target: Introduce Abi.androideabi to distinguish the soft float case.Alex Rønne Petersen
Abi.android on its own is not enough to know whether soft float or hard float should be used. In the C world, androideabi is typically used for the soft float case, so let's go with that. Note that Android doesn't have a hard float ABI, so no androideabihf. Closes #21488.
2024-09-23std.Target: Remove Cpu.Arch.dxil and ObjectFormat.dxcontainer.Alex Rønne Petersen
See: https://devblogs.microsoft.com/directx/directx-adopting-spir-v Since we never hooked up the (experimental) DirectX LLVM backend, we've never actually supported targeting DXIL in Zig. With Microsoft moving away from DXIL, that seems very unlikely to change.
2024-09-19std.Target: Add bridgeos tag to Os.Alex Rønne Petersen
2024-09-06std.Target: Make Abi.floatAbi() more accurate.Alex Rønne Petersen
Also rename Target.getFloatAbi() to floatAbi().
2024-09-03std.elf: Bring the EM enum up to date.Alex Rønne Petersen
Based on: * `include/elf/common.h` in binutils * `include/uapi/linux/elf-em.h` in Linux * https://www.sco.com/developers/gabi/latest/ch4.eheader.html I opted to use the tag naming of binutils because it seems to be by far the most complete and authoritative source at this point in time.
2024-08-28std: update `std.builtin.Type` fields to follow naming conventionsmlugg
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-15std.Target: Return the correct value for 32-bit sparc v9 in toElfMachine().Alex Rønne Petersen
2024-08-15std.Target: Return the correct value for elfiamcu in toElfMachine().Alex Rønne Petersen
2024-08-15std.Target: Pull toCoffMachine()/toElfMachine() up from Arch to Target.Alex Rønne Petersen
This enables them to give more correct results. Contributes to #20771.
2024-08-15std.coff: Capitalize MachineType.{Unknown,Thumb} for consistency.Alex Rønne Petersen
2024-08-15std.Target: Don't match PowerPC in Arch.toCoffMachine().Alex Rønne Petersen
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-15std.Target: Don't match big endian architectures in Arch.toCoffMachine().Alex Rønne Petersen
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-15std.Target: Clean up Arch.toCoffMachine().Alex Rønne Petersen
2024-08-15std.Target: Fix Arch.toElfMachine() for mips.Alex Rønne Petersen
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-15std.Target: Fix Arch.toElfMachine() for arc.Alex Rønne Petersen
The arc tag means ARCv2.
2024-08-15std.Target: Clean up Arch.toElfMachine().Alex Rønne Petersen
2024-08-15std.Target: Change requiresLibC() to return true for aix.Alex Rønne Petersen
AIX does not have a stable syscall interface; libc is required.
2024-08-15std.Target: Fix isGnuLibC() to handle hurd too.Alex Rønne Petersen
2024-08-15std.Target: Make some functions handle driverkit alongside other Apple OSs.Alex Rønne Petersen
Reference for versions: https://developer.apple.com/support/xcode
2024-08-14Merge pull request #21031 from linusg/std-target-namingAndrew Kelley
std.Target: Function naming cleanup
2024-08-12all: Handle spirv in addition to spirv(32,64) where applicable.Alex Rønne Petersen
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-12std.Target: Remove liteos OS tag.Alex Rønne Petersen
It has not seen development in 4 years. https://github.com/LiteOS/LiteOS/commits/master
2024-08-12std.Target: Remove minix OS tag.Alex Rønne Petersen
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-12std.Target: Remove no longer relevant TODO about SPIR-V ABIs.Alex Rønne Petersen
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-08-12std.Target: Remove supportsNewStackCall().Alex Rønne Petersen
This is literally just isWasm() and has no uses in the repository.
2024-08-12std.Target: Add comments explaining the baseline CPUs for hexagon/s390x.Alex Rønne Petersen
2024-08-12std.Target: Sort Os tags in a hopefully more sensible way.Alex Rønne Petersen
2024-08-12std.Target: Sort Arch tags in a hopefully more sensible way.Alex Rønne Petersen
2024-08-11std.Target: Some corrections and additions to stackAlignment().Alex Rønne Petersen
Sourced from LLVM and GCC backends and ABI documents.
2024-08-11Merge pull request #20985 from alexrp/gpu-nonsenseAndrew Kelley
Follow-up on `std.Target` GPU changes in #20960
2024-08-11std.Target: Add goff and xcoff to ObjectFormat.Alex Rønne Petersen
Also improve the docs a bit, and handle driverkit and dxil in default().
2024-08-12std.Target: Rename c_type_* functions to camel caseLinus Groh
From https://ziglang.org/documentation/master/#Names: > If `x` is otherwise callable, then `x` should be `camelCase`.
2024-08-12std.Target: Rename feature_set_fns to FeatureSetFnsLinus Groh
From https://ziglang.org/documentation/master/#Names: > If `x` is callable, and `x`'s return type is `type`, then `x` should > be `TitleCase`.