Commit Graph

38032 Commits

Author SHA1 Message Date
Matthew Lugg bb83883acd langref: update for language changes 2026-04-30 09:03:58 +01:00
Matthew Lugg c144003fca tests: fix libc test with -Dno-matrix 2026-04-30 09:03:58 +01:00
Matthew Lugg 72d954e7d3 compiler: remove array multiplication from the language
Resolves: https://github.com/ziglang/zig/issues/24738
2026-04-30 09:03:58 +01:00
Matthew Lugg fdac89d6cd remove uses of array multiplication
In preparation for its removal as accepted in
https://github.com/ziglang/zig/issues/24738.
2026-04-30 08:57:51 +01:00
Matthew Lugg 57634b7809 compiler: remove i0 from the language
Resolves: https://github.com/ziglang/zig/issues/1593
2026-04-30 08:57:51 +01:00
Matthew Lugg 213c4fc25f lib,test: remove uses of i0
In preparation for its removal, as accepted in
https://github.com/ziglang/zig/issues/1593.
2026-04-30 08:57:51 +01:00
Matthew Lugg d764716cb5 compiler: remove capturing errdefer from the language
Resolves: https://github.com/ziglang/zig/issues/23734
2026-04-30 08:57:50 +01:00
Matthew Lugg e67c344fc0 compiler,tests,tools: remove uses of capturing errdefer
In preparation for its removal, as accepted in
https://github.com/ziglang/zig/issues/23734.
2026-04-29 23:27:58 +01:00
Matthew Lugg 7b44e8986f Sema: remove void{} from the language
Because this syntax is not heavily used, and the migration can be done
with a simple text substitution, I do not believe a `zig fmt` fixup is
necessary for this change.

Resolves: https://github.com/ziglang/zig/issues/15213
2026-04-29 23:27:58 +01:00
Matthew Lugg 106850fd4c tests: remove uses of void{}
In preparation for this syntax to be removed from the language per
https://github.com/ziglang/zig/issues/15213.
2026-04-29 23:27:58 +01:00
Alex Rønne Petersen 2407ee954b Merge pull request 'implement .preinit_array support in link.Elf; link libtsan with -whole-archive' (#32107) from alexrp/zig:preinit-array into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32107
Reviewed-by: mlugg <mlugg@noreply.codeberg.org>
2026-04-29 22:10:21 +02:00
Alex Rønne Petersen 0227253677 compiler: link libtsan with -whole-archive
libtsan contains a .preinit_array entry that must run for correctness.
2026-04-29 13:01:33 +02:00
Alex Rønne Petersen 3906434746 link.Elf: implement .preinit_array support 2026-04-28 16:42:06 +02:00
Matthew Lugg ce198b7c28 std.c: fix Haiku definition of MSF 2026-04-28 12:52:03 +01:00
Alex Rønne Petersen 89ed51bf53 link.Elf, link.Lld: executables should not have an image base on Haiku
Executables are always ET_DYN on Haiku, so like shared libraries, they should
not have an image base set. Elf2 already got this right, but Elf and Lld didn't.

closes https://codeberg.org/ziglang/zig/issues/32100
2026-04-28 09:56:53 +02:00
mihael 764760df62 libzigc/math: Implement rintl, lrintl (#31791)
It's a fairly straightforward port of `musl`'s `rintl`, like `rint` and `rintf` were. `libc-test` tests for `rintl` are uncommented since they're now passing.

I've also covered special cases for `rint` with tests, and broke down the current `rint` and `modf` test declarations into multiple -- so each libc function get its own test declaration at the very least.

Contributes to #30978

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/31791
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-27 16:48:55 +02:00
GasInfinity 1deb029a66 std: rename bit_set variants and deprecate the managed one.
* aliases and deprecates the previous names.
* also update callsites to use the non-deprecated declarations.
2026-04-27 16:46:26 +02:00
Alex Rønne Petersen c166c49b19 build: use -ffunction-sections -fdata-sections for the Zig compiler on Hexagon 2026-04-27 13:55:38 +02:00
Alex Rønne Petersen dde76ae5f7 libunwind: unregress x32 and mips n32 build
https://github.com/llvm/llvm-project/issues/194228
2026-04-27 10:16:02 +02:00
Alex Rønne Petersen 669c066801 llvm: fix sign extension of 32-bit integers in callconv(.c) on mips 2026-04-27 09:42:08 +02:00
Alex Rønne Petersen 11fbf78cb3 Merge pull request 'std: re-enable some tests on loongarch64 and s390x' (#32079) from alexrp/zig:reenable-tests into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32079
2026-04-27 06:40:15 +02:00
Alex Rønne Petersen 19fd87fff1 std.http.test: update issue link for powerpc64 LLVM crash
https://github.com/llvm/llvm-project/issues/194257
2026-04-26 21:46:14 +02:00
Alex Rønne Petersen 4eb9db0b24 std: re-enable some tests on loongarch64 2026-04-26 21:22:34 +02:00
Alex Rønne Petersen fc56124fac std: re-enable some tests on s390x
closes https://github.com/ziglang/zig/issues/25957
2026-04-26 21:22:31 +02:00
Alex Rønne Petersen c47c05386e llvm-libc: update to LLVM 22 2026-04-26 19:26:16 +02:00
Alex Rønne Petersen 9f2f6aaef5 drop support for powerpc64-linux-gnu
glibc has never officially supported ELFv2 on big-endian PowerPC, and we do not
(and likely never will) support linking ELFv1. So just drop this target instead
of pretending we actually have anything resembling usable support for it. This
is a dying target anyway; IBM have been pushing people to powerpc64le for years
now, and most distros have dropped big endian.

glibc headers and abilists are not updated as part of this; I'll just let that
happen automatically on the next glibc update. Size savings are expected to be
very minimal anyway since there's large overlap between powerpc64 and
powerpc64le.

This commit also fixes a couple of bad assumptions in std.Target:

* The dynamic linker path should be /lib64/ld64.so.1. We should get this right
  even if the Zig compiler doesn't support the target.
* cCallingConvention() was picking powerpc64_elf_v2 only for musl targets. In
  reality, for the targets we support in std.Target, it should pick v2 for all
  except powerpc64-linux-gnu.

Finally, this switches LLVM codegen to use ELFv2 data layout for all targets
except ps3.
2026-04-26 19:24:46 +02:00
Matthew Lugg 8c5542bd38 incremental: add test for changing container kind
This used to trigger bugs, but works correctly as of Zig 0.16.0.

Resolves: https://github.com/ziglang/zig/issues/24217
2026-04-26 15:46:58 +02:00
Alex Rønne Petersen 814988647f libcxxabi: unregress arm-freebsd and arm-openbsd build
https://github.com/llvm/llvm-project/issues/194232

Regression known for at least 2 months, but hey, just ship it anyway.
2026-04-26 15:42:05 +02:00
Alex Rønne Petersen af40866628 test: re-enable std tests for dynamic powerpc-linux-musleabi and powerpc-linux-gnueabi 2026-04-26 14:45:57 +02:00
Alex Rønne Petersen c75207a261 ci: update Wasmtime to 44.0.0 2026-04-26 07:46:25 +02:00
Alex Rønne Petersen 69fcca8556 test: disable a couple of failing C ABI tests on hexagon 2026-04-26 07:44:58 +02:00
Alex Rønne Petersen 0e8e987deb README: LLVM 21 -> 22 2026-04-26 07:10:46 +02:00
Alex Rønne Petersen a83aad152b Merge pull request 'LLVM 22' (#32013) from llvm22 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32013
2026-04-26 07:03:38 +02:00
Andrew Kelley f0a7e3ccae Merge pull request 'fix more c abi bugs' (#32071) from c-abi-padding into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32071
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-04-26 04:22:38 +02:00
Andrew Kelley e7d74e49b0 declare linker test bankruptcy
The active contributors and maintainers of Zig's linker code have
generally found the current linker test harness to be cumbersome. The
tests require a lot of maintenance, but do not provide a lot of
coverage, and when they fail it is painful to troubleshoot.

Furthermore, as part of working on #31691, I don't want to port over the
CheckObject step, because I don't like the code anyway.

The plan forward is to start enhancing `zig objdump` to assist in
linker development, as well as using it as the basis for snapshot
testing.

We absolutely need linker test coverage, but we need to try to improve
these things about the next attempt:
* less effort to create and maintain tests
* less CPU overhead - we should be able to add a lot of tests without
  adding a lot of CI time.
* more helpful failures. A failed linker test should provide the next
  steps a developer can take to understand why the test failed.
* a goal of porting over all of LLD's test suite, or at least the good
  ones.

I'm not going to open an issue to track the lost linker test coverage,
because there was already so much lack of coverage for linker stuff.

However I will open issues to track this lost coverage:
* the deleted checks from test/standalone/glibc_compat/build.zig
* the deleted checks from test/standalone/compiler_rt_panic/build.zig
* the deleted checks from test/standalone/ios/build.zig
2026-04-26 00:15:07 +02:00
Alex Rønne Petersen 8443e2ab43 ci: update tarballs to 0.17.0-dev.203+073889523 2026-04-25 22:02:35 +02:00
Alex Rønne Petersen 0738895237 stage1: update zig1.wasm
Signed-off-by: Alex Rønne Petersen <alex@alexrp.com>
2026-04-25 21:58:40 +02:00
Alex Rønne Petersen d3ee286511 test: add loongarch64-linux-muslsf to test-c-abi matrix 2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 1bd9f3f4f2 test: add loongarch64-linux-(gnu,musl)sf to test-modules matrix 2026-04-25 21:54:48 +02:00
Alex Rønne Petersen a9fbcb7c67 test: add loongarch32-linux-none to test-modules matrix 2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 9ecf5b4603 test: add some loongarch32 targets to llvm_targets 2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 963c17f097 test: add hexagon-linux-musl to llvm_targets 2026-04-25 21:54:48 +02:00
Alex Rønne Petersen bd12a5a6e1 std: re-enable a bunch of tests that now pass
closes https://github.com/ziglang/zig/issues/21893
closes https://github.com/ziglang/zig/issues/23806
closes https://github.com/ziglang/zig/issues/23807
closes https://github.com/ziglang/zig/issues/24191
closes https://codeberg.org/ziglang/zig/issues/30220
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 1af476d5d8 behavior: re-enable a bunch of behavior tests that now pass
closes https://github.com/ziglang/zig/issues/9660
closes https://github.com/ziglang/zig/issues/21050
closes https://github.com/ziglang/zig/issues/21090
closes https://github.com/ziglang/zig/issues/21091
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen cc022047c3 Revert "test: disable hexagon-linux-musl C ABI tests for now"
This reverts commit fce7878a91.

The bug was fixed in LLVM 22.
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 7829397f89 Revert "std.zig.system: disable vector support on s390x for now"
This reverts commit 1cd913a0ec.

The bug was fixed in LLVM 22.
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 061c13f13b Revert "std.mem: work around LoongArch inline asm bug in doNotOptimizeAway()"
This reverts commit e7f1624e6e.

The bug was fixed in LLVM 22.
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 4eb8640213 Revert "test: skip alternative constraints behavior test on LoongArch"
This reverts commit f90548e740.

The bug was fixed in LLVM 22.
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen 51a6a5a2a6 Revert "std.math.modf: disable vector test on LoongArch with LSX"
This reverts commit 35d2b1e99a.

The bug was fixed in LLVM 22.
2026-04-25 21:54:48 +02:00
Alex Rønne Petersen a0ad35d0ba Revert "test: disable some vector ctz/clz behavior tests on LoongArch with LSX"
This reverts commit beb25b0430.

The bug was fixed in LLVM 22.
2026-04-25 21:54:48 +02:00