Commit graph

268 commits

Author SHA1 Message Date
Jacob Young
917640810e Target: pass and use locals by pointer instead of by value
This struct is larger than 256 bytes and code that copies it
consistently shows up in profiles of the compiler.
2025-06-19 11:45:06 -04:00
Andrew Kelley
5a52da1b7a CI: skip llvm backend tests in the script for testing x86 backend 2025-06-06 23:42:15 -07:00
Alex Rønne Petersen
9d534790eb std.Target: Introduce Cpu convenience functions for feature tests.
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-06-05 06:12:00 +02:00
Jacob Young
ec579aa0f3
Legalize: implement scalarization of @shuffle 2025-06-01 08:24:01 +01:00
Ali Cheraghi
0901328f12 spirv: write error value in an storage buffer 2025-05-21 12:57:40 +03:30
Alex Rønne Petersen
1a82cceb8c
std.Target: Factor arch/ABI into NetBSD minimum OS version selection.
Based on data in std.zig.target.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
6028db7f29
std.Target: Add isNetBSDLibC() function. 2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
8a7d925d36
std.Target: Fix requiresLibC() for NetBSD. 2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
3d6f83b331
std.Target: Adjust DynamicLinker.standard() for NetBSD.
* powerpc64 does not appear to be a thing.
* riscv32/riscv64 have not had actual releases yet.
2025-05-17 04:41:27 +02:00
Alex Rønne Petersen
8285de62d5
Merge pull request #23745 from alexrp/target-os-versions
`std.Target`: Update supported OS version ranges
2025-05-12 16:59:46 +02:00
Alex Rønne Petersen
833d4c9ce4
Merge pull request #23835 from alexrp/freebsd-libc
Support dynamically-linked FreeBSD libc when cross-compiling
2025-05-12 01:19:23 +02:00
Alex Rønne Petersen
c3906718b3
Merge pull request #23810 from alexrp/more-test-targets 2025-05-11 20:52:47 +02:00
Alex Rønne Petersen
837e0f9c37 std.Target: Remove ObjectFormat.nvptx (and associated linker code).
Textual PTX is just assembly language like any other. And if we do ever add
support for emitting PTX object files after reverse engineering the bytecode
format, we'd be emitting ELF files like the CUDA toolchain. So there's really no
need for a special ObjectFormat tag here, nor linker code that treats it as a
distinct format.
2025-05-10 12:21:57 +02:00
Alex Rønne Petersen
0e3609b8e0
std.Target: Factor arch/ABI into FreeBSD minimum OS version selection.
Based on data in std.zig.target.
2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
309ff9c34e
std.Target: Add isFreeBSDLibC() function. 2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
46042170cb
std.Target: Fix requiresLibC() for FreeBSD. 2025-05-10 12:19:26 +02:00
Alex Rønne Petersen
23cb2b2662
std.Target: Handle {powerpc64,riscv32}-netbsd in DynamicLinker.standard(). 2025-05-09 14:07:40 +02:00
Alex Rønne Petersen
d3e8541268
std.Target: Prune dead targets in Abi.default() and DynamicLinker.standard(). 2025-05-08 21:32:20 +02:00
Alex Rønne Petersen
bf9b15ee67 std.Target: Add Cpu.Arch.or1k and basic target info. 2025-05-03 11:22:27 +02:00
Alex Rønne Petersen
c1fc353923
std.Target: Update maximum supported Vulkan version. 2025-05-02 19:56:00 +02:00
Alex Rønne Petersen
8b7f512b9a
std.Target: Update maximum supported CUDA version. 2025-05-02 19:55:58 +02:00
Alex Rønne Petersen
3af2594df5
std.Target: Update supported AMD ROCm version range. 2025-05-02 19:55:08 +02:00
Alex Rønne Petersen
b3977695bd
std.Target: Update supported Apple OS version ranges. 2025-05-02 19:54:48 +02:00
Alex Rønne Petersen
be8b6b5435
std.Target: Update supported OpenBSD version range. 2025-05-02 19:54:34 +02:00
Alex Rønne Petersen
f3bf26138c
std.Target: Update maximum supported Dragonfly BSD version. 2025-05-02 19:54:10 +02:00
Alex Rønne Petersen
9013d9ed78
std.Target: Update maximum supported AIX version. 2025-05-02 19:53:58 +02:00
Alex Rønne Petersen
2f999dd3af
std.Target: Update supported Hermit version range. 2025-05-02 19:52:47 +02:00
Alex Rønne Petersen
cb4022b039
std.Target: Update supported Fuchsia version range. 2025-05-02 19:52:23 +02:00
Alex Rønne Petersen
e7b46363ae std.Target: Remove Os.Tag.elfiamcu.
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-28 00:24:09 +02:00
Alex Rønne Petersen
5668c8b7ba std.Target: Bump minimum glibc to 2.34 for arches migrating to 64-bit time.
https://github.com/ziglang/zig/issues/21738#issuecomment-2822411842
2025-04-27 00:24:55 +02:00
Alex Rønne Petersen
23440fbb99 std.Target: Remove Abi.gnuilp32.
* This has not seen meaningful development for about a decade.
* The Linux kernel port was never upstreamed.
* The glibc port was never upstreamed.
* GCC 15.1 recently deprecated support it.

It may still make sense to support an ILP32 ABI on AArch64 more broadly (which
we already have the Abi.ilp32 tag for), but, to the extent that it even existed
in any "official" sense, the *GNU* ILP32 ABI is certainly dead.
2025-04-26 22:12:31 +02:00
Andrew Kelley
2cb69e53b4
Merge pull request #23541 from alexrp/linux-5.10
`std.Target`: Bump minimum Linux kernel and glibc versions according to Debian LTS
2025-04-13 17:25:34 -04:00
Alex Rønne Petersen
46d03c5afa
std.Target: Bump minimum glibc version to 2.31.
This is the version in Debian LTS (bullseye).
2025-04-11 21:11:20 +02:00
Alex Rønne Petersen
731d6531bf
std.Target: Bump minimum Linux kernel version to 5.10.
This is the kernel in Debian LTS (bullseye).
2025-04-11 21:10:55 +02:00
Alex Rønne Petersen
ed9aa8f259 compiler: Move int size/alignment functions to std.Target and std.zig.target.
This allows using them in e.g. compiler-rt.
2025-04-11 05:22:00 -04:00
Alex Rønne Petersen
0132be7bf3 std.Target: Rename charSignedness() to cCharSignedness().
To be consistent with the other functions that answer C ABI questions.
2025-04-11 05:22:00 -04:00
Alex Rønne Petersen
c8631ec523
std.Target: Bump minimum Dragonfly BSD version to 6.0.0. 2025-04-06 08:05:07 +02:00
Alex Rønne Petersen
af19161817
std.Target: Bump minimum OpenBSD version to 7.5.
Per: https://www.openbsd.org/faq/faq5.html#Flavors
2025-04-06 08:05:07 +02:00
Alex Rønne Petersen
a88db11c2a
std.Target: Bump minimum NetBSD version to 9.4.
Per: https://www.netbsd.org/releases
2025-04-06 08:05:07 +02:00
Alex Rønne Petersen
ae98d79c87
std.Target: Bump minimum FreeBSD version to 13.4.
Per: https://www.freebsd.org/releases
2025-04-06 07:44:38 +02:00
Alex Rønne Petersen
8954e9748a
std.Target: Add Abi.muslf32 and Abi.muslsf. 2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
1599f8ade0
std.Target: Bump baseline hexagon model to hexagonv68.
https://github.com/llvm/llvm-project/pull/125584
2025-04-04 06:08:09 +02:00
Alex Rønne Petersen
eefb334885
std.Target: Bump baseline bpfel/bpfeb model to v3.
https://github.com/llvm/llvm-project/pull/131691
2025-04-04 06:08:09 +02:00
孙冰
d7e944a628
std.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-26 19:48:21 +08:00
Meghan Denny
0f6056903b std: Abi.default: only require an os tag 2025-03-09 09:44:11 +01:00
Alex Rønne Petersen
055969b101 std.Target: Update known max OS versions. 2025-02-25 20:30:43 +01:00
Andrew Kelley
eb3c7f5706 zig build fmt 2025-02-22 17:09:20 -08:00
Alex Rønne Petersen
481b7bf3f0
std.Target: Remove functions that just wrap component functions.
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-17 19:18:19 +01:00
Alex Rønne Petersen
e62352611f
std.Target: Move osArchName() and Cpu.Arch.archName() to std.zig.target.
These deal with how Zig stores OS headers in `lib/libc/include` and so don't
really belong in std.Target.
2025-02-17 19:17:56 +01:00
Alex Rønne Petersen
ce8c61b0fc
std.Target: Move Cpu.Arch.supportsAddressSpace() up to Cpu.
This allows it to inspect CPU features which is needed for Propeller, and AVR in
the future.
2025-02-17 19:17:56 +01:00