aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Target.zig
AgeCommit message (Collapse)Author
2025-04-13Merge pull request #23541 from alexrp/linux-5.10Andrew Kelley
`std.Target`: Bump minimum Linux kernel and glibc versions according to Debian LTS
2025-04-11std.Target: Bump minimum glibc version to 2.31.Alex Rønne Petersen
This is the version in Debian LTS (bullseye).
2025-04-11std.Target: Bump minimum Linux kernel version to 5.10.Alex Rønne Petersen
This is the kernel in Debian LTS (bullseye).
2025-04-11compiler: Move int size/alignment functions to std.Target and std.zig.target.Alex Rønne Petersen
This allows using them in e.g. compiler-rt.
2025-04-11std.Target: Rename charSignedness() to cCharSignedness().Alex Rønne Petersen
To be consistent with the other functions that answer C ABI questions.
2025-04-06std.Target: Bump minimum Dragonfly BSD version to 6.0.0.Alex Rønne Petersen
2025-04-06std.Target: Bump minimum OpenBSD version to 7.5.Alex Rønne Petersen
Per: https://www.openbsd.org/faq/faq5.html#Flavors
2025-04-06std.Target: Bump minimum NetBSD version to 9.4.Alex Rønne Petersen
Per: https://www.netbsd.org/releases
2025-04-06std.Target: Bump minimum FreeBSD version to 13.4.Alex Rønne Petersen
Per: https://www.freebsd.org/releases
2025-04-04std.Target: Add Abi.muslf32 and Abi.muslsf.Alex Rønne Petersen
2025-04-04std.Target: Bump baseline hexagon model to hexagonv68.Alex Rønne Petersen
https://github.com/llvm/llvm-project/pull/125584
2025-04-04std.Target: Bump baseline bpfel/bpfeb model to v3.Alex Rønne Petersen
https://github.com/llvm/llvm-project/pull/131691
2025-03-26std.Target: Update default Android API level to 24孙冰
API level 24 completes _FILE_OFFSET_BITS=64 support in bionic, c.f. https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md. According to https://apilevels.com, API level 24 (Android 7 released in 2017) has 97% cumulative usage.
2025-03-09std: Abi.default: only require an os tagMeghan Denny
2025-02-25std.Target: Update known max OS versions.Alex Rønne Petersen
2025-02-22zig build fmtAndrew Kelley
2025-02-17std.Target: Remove functions that just wrap component functions.Alex Rønne Petersen
Functions like isMinGW() and isGnuLibC() have a good reason to exist: They look at multiple components of the target. But functions like isWasm(), isDarwin(), isGnu(), etc only exist to save 4-8 characters. I don't think this is a good enough reason to keep them, especially given that: * It's not immediately obvious to a reader whether target.isDarwin() means the same thing as target.os.tag.isDarwin() precisely because isMinGW() and similar functions *do* look at multiple components. * It's not clear where we would draw the line. The logical conclusion before this commit would be to also wrap Arch.isX86(), Os.Tag.isSolarish(), Abi.isOpenHarmony(), etc... this obviously quickly gets out of hand. * It's nice to just have a single correct way of doing something.
2025-02-17std.Target: Move osArchName() and Cpu.Arch.archName() to std.zig.target.Alex Rønne Petersen
These deal with how Zig stores OS headers in `lib/libc/include` and so don't really belong in std.Target.
2025-02-17std.Target: Move Cpu.Arch.supportsAddressSpace() up to Cpu.Alex Rønne Petersen
This allows it to inspect CPU features which is needed for Propeller, and AVR in the future.
2025-02-17std.Target: Make Cpu.Arch.supportsAddressSpace() take an optional context.Alex Rønne Petersen
Allows deduplicating the code in Sema.
2025-02-17std.builtin: Rename CallingConvention.propeller1_sysv to propeller_sysv.Alex Rønne Petersen
2025-02-17std.builtin: Rename CallingConvention.wasm_watc to wasm_mvp.Alex Rønne Petersen
2025-02-17std.builtin: Remove CallingConvention.arm_(apcs,aapcs16_vfp).Alex Rønne Petersen
* arm_apcs is the long dead "OABI" which we never had working support for. * arm_aapcs16_vfp is for arm-watchos-none which is a dead target that we've dropped support for.
2025-02-17std.Target: Remove Cpu.Arch.propeller2 and use a CPU feature instead.Alex Rønne Petersen
2025-02-17std.Target: Remove Cpu.Arch.spu_2.Alex Rønne Petersen
This was for a hobby project that appears to be dormant for now. This can be added back if the project is resumed in the future.
2025-02-12std: remove special cases for stage2_x86_64 that are no longer neededJacob Young
2025-02-08std.Target: Bump UEFI max version to 2.11Linus Groh
This is the most recent version, released in December 2024. https://uefi.org/specs/UEFI/2.11/
2025-02-01std.Target: bump semver min/max for BSDs and AppleMichael Dusan
2025-01-24compiler: yet more panic handler changesmlugg
* `std.builtin.Panic` -> `std.builtin.panic`, because it is a namespace. * `root.Panic` -> `root.panic` for the same reason. There are type checks so that we still allow the legacy `pub fn panic` strategy in the 0.14.0 release. * `std.debug.SimplePanic` -> `std.debug.simple_panic`, same reason. * `std.debug.NoPanic` -> `std.debug.no_panic`, same reason. * `std.debug.FormattedPanic` is now a function `std.debug.FullPanic` which takes as input a `panicFn` and returns a namespace with all the panic functions. This handles the incredibly common case of just wanting to override how the message is printed, whilst keeping nice formatted panics. * Remove `std.builtin.panic.messages`; now, every safety panic has its own function. This reduces binary bloat, as calls to these functions no longer need to prepare any arguments (aside from the error return trace). * Remove some legacy declarations, since a zig1.wasm update has happened. Most of these were related to the panic handler, but a quick grep for "zig1" brought up a couple more results too. Also, add some missing type checks to Sema. Resolves: #22584 formatted -> full
2025-01-22std.Target: Define and use lime1 as the baseline CPU model for WebAssembly.Alex Rønne Petersen
See: https://github.com/WebAssembly/tool-conventions/pull/235 This is not *quite* using the same features as the spec'd lime1 model because LLVM 19 doesn't have the level of feature granularity that we need for that. This will be fixed once we upgrade to LLVM 20. Part of #21818.
2025-01-22std.Target: Use mvp as the generic CPU model for wasm32/wasm64.Alex Rønne Petersen
As discussed in #21818, generic is a poor baseline model because that model is a moving target in LLVM. Instead, use mvp, which has no features enabled.
2025-01-15wasm linker: finish the flush functionAndrew Kelley
This branch is passing type checking now.
2024-12-17std.Target: Incorporate the Abi tag in VersionRange.default().Alex Rønne Petersen
This is necessary to pick out the correct minimum OS version from the std.zig.target.available_libcs list.
2024-12-15std.Target: Remove special case for wasm in Abi.default().Alex Rønne Petersen
It'll still pick .musl for os.tag == .wasi.
2024-12-12Merge pull request #22090 from alexrp/glibc-runtime-triplesAlex Rønne Petersen
Add `std.zig.target.glibcRuntimeTriple()` and use it in `std.Build.Step.Run` and `process_headers.zig`
2024-12-09std.Target: Remove our broken support for the ancient and obsolete Arm OABI.Alex Rønne Petersen
NetBSD has long since migrated to the EABI and doesn't officially support the OABI anymore. The ABI selection logic in LLVM only actually picks OABI for NetBSD as a last resort if the EABI isn't selected. That fallback is likely to be removed in the future. So just remove this support in Zig entirely. While here, I also removed some leftover 32-bit Arm and 32-bit x86 code for Apple targets, which are long dead and unsupported by Zig.
2024-12-06std.Target: Fix charSignedness() for hexagon.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-28std.Target: Fix long double alignment for wasm(32,64)-emscripten-*.Alex Rønne Petersen
2024-11-28std.Target: Fix long double size for aarch64-bridgeos-*.Alex Rønne Petersen
2024-11-28std.Target: Fix long/unsigned long size for aarch64-watchos-ilp32.Alex Rønne Petersen
2024-11-28std.Target: Add missing C type info for aix, elfiamcu, hermit, hurd, rtems, ↵Alex Rønne Petersen
and zos.
2024-11-28std.Target: Add hurdTuple() and hurdTupleSimple() functions.Alex Rønne Petersen
These serve the same purpose as the linuxTriple() and linuxTripleSimple() functions, i.e. to return a triple understood by the GNU ecosystem.
2024-11-28Merge pull request #22067 from alexrp/pie-testsAlex Rønne Petersen
Add PIC/PIE tests and fix some bugs + some improvements to the test harness
2024-11-25CI: update macOS runner to 13Andrew Kelley
Apple has already dropped support for macOS 12. GitHub Actions is dropping macOS 12 support now. The Zig project is also dropping macOS 12 support now. This commit also bumps default minimum macos version to 13.
2024-11-24std.Target: Fix Abi.default() for mips64/mips64el.Alex Rønne Petersen
This is necessary after: * 270fbbcd86b02fcd02ad9b818d9de39dfe671754 * 11915ae48e44cfd9d4e5c5823919fb24951e68f9
2024-11-24std.Target: Add Os.HurdVersionRange for Os.Tag.hurd.Alex Rønne Petersen
This is necessary since isGnuLibC() is true for hurd, so we need to be able to represent a glibc version for it. Also add an Os.TaggedVersionRange.gnuLibCVersion() convenience function.
2024-11-12Merge pull request #21920 from alexrp/nobuiltinAlex Rønne Petersen
compiler: Improve handling of `-fno-builtin` and compiler-rt options
2024-11-08add storage_buffer address spaceRobin Voetter
2024-11-08std.Target: Fix toCoffMachine() value for thumb.Alex Rønne Petersen