aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Target
AgeCommit message (Collapse)Author
2025-10-30Merge pull request #25558 from jacobly0/elfv2-load-objJacob Young
Elf2: start implementing input object loading
2025-10-30Merge pull request #25733 from GasInfinity-Forks/x86_16-cpu_contextAlex Rønne Petersen
* fix: add `i86` cpu in `update_cpu_features` * feat: add `x86_16` debug `cpu_context`
2025-10-29Elf2: start implementing dynamic linkingJacob Young
2025-10-29Merge pull request #25592 from ziglang/init-std.IoAndrew Kelley
std: Introduce `Io` Interface
2025-10-29fix: add `i86` cpu in `update_cpu_features`GasInfinity
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-29std.zig.system: upgrade to std.Io.ReaderAndrew Kelley
2025-10-29std.Target.aarch64: updates for LLVM 21.1.5Alex Rønne Petersen
2025-10-28Merge pull request #25691 from GasInfinity-Forks/x86_16-gccAlex Rønne Petersen
feat: init x86_16 arch via CBE
2025-10-28Fix stale reference bug in `std.zig.system.resolveTargetQuery` (#25713)Sean
Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2025-10-27feat: init x86_16 arch via CBEGasInfinity
2025-09-18std.Target: adjustments to LoongArch CPU modelsAlex Rønne Petersen
* Remove the generic model; we already have generic_la32 and generic_la64 and pick appropriately based on bitness. * Remove the loongarch64 model. We used this as our baseline for 64-bit, but it's actually pretty misleading and useless; it doesn't represent any real CPU and has less features than generic_la64. * Add la64v1_0 and la64v1_1 models. * Change our baseline CPU model for 64-bit to be la64v1_0, thus adding LSX to the baseline feature set.
2025-08-30std.Target.x86: purge avx10.n-256, rename avx10.n_512 to avx10.n, require ↵Alex Rønne Petersen
evex512 for avx512f Intel has abandoned AVX10.N/128,256; AVX10.N is now always 512-bit.
2025-08-30std.Target: update CPU features to LLVM 21Alex Rønne Petersen
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-05std.Target.Query: fix `WindowsVersion` format in `zigTriple()`KNnut
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string
2025-06-23remove `spirv` cpu archAli Cheraghi
2025-06-19Target: pass and use locals by pointer instead of by valueJacob Young
This struct is larger than 256 bytes and code that copies it consistently shows up in profiles of the compiler.
2025-06-05std.Target: Introduce Cpu convenience functions for feature tests.Alex Rønne Petersen
Before: * std.Target.arm.featureSetHas(target.cpu.features, .has_v7) * std.Target.x86.featureSetHasAny(target.cpu.features, .{ .sse, .avx, .cmov }) * std.Target.wasm.featureSetHasAll(target.cpu.features, .{ .atomics, .bulk_memory }) After: * target.cpu.has(.arm, .has_v7) * target.cpu.hasAny(.x86, &.{ .sse, .avx, .cmov }) * target.cpu.hasAll(.wasm, &.{ .atomics, .bulk_memory })
2025-05-21target: auto-generated spirv featuresAli Cheraghi
2025-05-21spirv: write error value in an storage bufferAli Cheraghi
2025-04-04std.Target: Update CPU models/features for LLVM 20.Alex Rønne Petersen
Closes #21818.
2025-03-18spirv: require int8/int16 capabilitiesAli Cheraghi
2025-03-17spirv/target: arbitrary_precision_integers feature supportAli Cheraghi
2025-03-17target: split `addresses` and `physical_storage_buffer` featuresAli Cheraghi
2025-03-09std.Target.Query: Don't append glibc version in zigTriple() if ABI isn't GNU.Alex Rønne Petersen
2025-02-24spirv: replace some unreachables with compile errorsAli Cheraghi
2025-02-18spirv: ziggify and remove unknown spirv featuresAli Cheraghi
`OpCapability` and `OpExtension` now can also be emitted from inline assembly
2025-02-18target: update spirv featuresAli Cheraghi
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: Remove Cpu.Arch.propeller2 and use a CPU feature instead.Alex Rønne Petersen
2025-01-22wasm: Add a nontrapping_bulk_memory_len0 feature.Alex Rønne Petersen
This will mainly be used when targeting our wasm2c implementation which has no problem with zero-length bulk memory operations, as a non-standard extension.
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-16x86_64: implement clz and notJacob Young
2025-01-05std: fix undefined value in Target.Querymlugg
This is an RLS footgun. Resolves: #21834
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-25refactor `update_cpu_features.zig`David Rubin
Most of this commit is whitespace changes, moving to use RLS for assigning the `CpuModel`
2024-11-25make `crc32` a featdep of `sse4.2`David Rubin
To my knowledge there isn't an implementation of `sse4.2` that doesn't have `crc32`. The Clang driver also sets `crc32` to be implicitly enabled when an explicit `-crc32` wasn't provided. This matches that behaviour. We need this behaviour to compile libraries like `rocksdb` which currently guard against `crc32` intrinsics by checking for `sse4.2`.
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-06Provide a detailed message for invalid arch in target triple (#21921)Daniel Hooper
2024-11-02std.Target: Rename amdgpu module to amdgcn.Alex Rønne Petersen
This was an inconsistency left over from c825b567b26c475e058e074e5d22af006854fab6.
2024-11-02std.Target: Remove armv7k/armv7s.Alex Rønne Petersen
Like d1d95294fd657f771657ea671a6984b860347fb0, this is more Apple nonsense where they abused the arch component of the triple to encode what's really an ABI. Handling this correctly in Zig's target triple model would take quite a bit of work. Fortunately, the last Armv7-based Apple Watch was released in 2017 and these targets are now considered legacy. By the time Zig hits 1.0, they will be a distant memory. So just remove them.
2024-11-01std.Target: Add support for specifying Android API level.Alex Rønne Petersen
2024-10-16std.Target: Rename OS version range functions to drop the "get" prefix.Alex Rønne Petersen
2024-10-16std.Target: Change Cpu.baseline() to also be able to take OS into consideration.Alex Rønne Petersen
2024-10-12std.Target.Query: fix compilation error (#21669)DravenK
closes #21668 Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
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-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.