Commit Graph

36589 Commits

Author SHA1 Message Date
Alex Rønne Petersen 64f5ef8880 ci: add powerpc64le-linux scripts 2026-01-06 21:15:38 +01:00
Alex Rønne Petersen 6a1fecea67 build: bump max_rss for test-behavior on powerpc64le-linux to 627_431_833 2026-01-06 21:15:35 +01:00
Alex Rønne Petersen 7daf0b6f46 build: use -ffunction-sections -fdata-sections for the Zig compiler on PowerPC
It has been observed in practice on powerpc64(le)-linux that zig.o (in various
stages and build modes) is large enough that the +/- 32MB branch range of
PowerPC is insufficient to reach from one end of the code section to the other.
With LLVM 21, this leads to silent miscompiles that then crash at runtime. With
LLVM 22, it will at least lead to branch range errors that fail the compilation,
but that gets us no closer to a working compiler.

By using these options, we give the linker much greater flexibility to move code
and data around to satisfy these range constraints; without them, the linker is
not allowed to split up the huge code and data sections of zig.o to do so.

Similar issues have also been observed on powerpc-linux (32-bit), hexagon-linux,
and some variations of mips(64)(el)-linux. But let's be conservative for now;
those other targets can be added to the condition later.

As a data point to support this change, it's worth noting that LLD started
enabling these options for LTO precisely because the resulting large compilation
units ran into these range issues. In some abstract sense, Zig can be seen as
doing a limited form of "LTO" in the frontend, so it's not surprising that we
would hit the same issues.
2026-01-06 21:15:02 +01:00
Alex Rønne Petersen a996a75e06 compiler: make all Zig-provided libraries use -ffunction-sections -fdata-sections
We already did this for some of them; this just makes us consistent. Doing this
gives the linker more flexibility to rearrange code/data, but more importantly,
allows --gc-sections to get rid of all the unused code, which is a real concern
for these libraries in particular.
2026-01-06 21:15:02 +01:00
Alex Rønne Petersen 312b231da9 ci: bump riscv64-linux timeouts by a further 2 hours
See 962903e0fa.
2026-01-06 21:00:03 +01:00
Alex Rønne Petersen 219624111b build: bump max_rss for zig exe to 7_900_000_000
Needed for riscv64-linux. Overkill for everything else, but: e19c686c22.
2026-01-06 20:55:23 +01:00
Alex Rønne Petersen 018da9662d build: bump max_rss for test-std on riscv64-linux to 4_052_670_054 2026-01-06 20:54:21 +01:00
Alex Rønne Petersen 378b4d3d3a build: bump max_rss for test-behavior on riscv64-linux to 827_043_430 2026-01-06 20:54:06 +01:00
Alex Rønne Petersen e226df2ed5 Merge pull request 'add OpenBSD libc cross-compilation support' (#30064) from alexrp/zig:openbsd into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30064
Reviewed-by: Andrew Kelley <andrewrk@noreply.codeberg.org>
2026-01-06 16:12:54 +01:00
Alex Rønne Petersen 9d08eba2e1 std.crypto.argon2: skip flaky argon2d test
https://codeberg.org/ziglang/zig/issues/30074
2026-01-06 10:02:09 +01:00
Alex Rønne Petersen b0da914ae6 std.crypto.argon2: disable flaky phc format hasher test
https://codeberg.org/ziglang/zig/issues/30682
2026-01-06 10:01:16 +01:00
Alex Rønne Petersen d757d5e6b2 Merge pull request 'some CI script improvements' (#30177) from alexrp/zig:ci-stuff into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30177
2026-01-06 09:56:15 +01:00
Alex Rønne Petersen 435b8411b5 ci: update to qemu 10.2.0 2026-01-06 09:55:09 +01:00
Andrew Kelley c906f7d2e7 Merge pull request 'std: rework atomic file / temp file API' (#30686) from std.Io.File.Atomic into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30686
2026-01-06 05:32:16 +01:00
Andrew Kelley 06130c5e61 std.Io.Threaded: set O_DIRECTORY along with O_TMPFILE 2026-01-05 20:31:31 -08:00
Andrew Kelley f9a5b34e67 std.Io.Threaded: fix compilation on s390x, hexagon, or1k, m68k
Apparently the O_TMPFILE flag is split across two bits on these
architectures and missing on m68k.
2026-01-05 20:28:58 -08:00
Andrew Kelley 3859250c4d std.Io.Threaded: only linux supports fileHardLink 2026-01-05 20:28:58 -08:00
Andrew Kelley 39605bd6bc compiler: update to new createFileAtomic API 2026-01-05 20:28:58 -08:00
Andrew Kelley 4365b0df88 std.Io.Threaded: add File.hardLink 2026-01-05 20:28:58 -08:00
Andrew Kelley 81bfd28974 std.Io.Dir: rework atomic file 2026-01-05 20:28:58 -08:00
Michael Dusan 6ab1159e81 netbsd: use correct symbol for lwp_park 2026-01-06 05:27:54 +01:00
Andrew Kelley d3d6761e43 std: depend on NtDll rather than advapi32.dll for entropy 2026-01-05 12:16:54 -08:00
Ryan Liptak 52141fe85f standalone tests: Delete all ad hoc TmpDir instances, use the build system instead 2026-01-05 20:41:18 +01:00
Alex Rønne Petersen b318ee6cda ci: pass -Dskip-openbsd on x86_64-freebsd and x86_64-linux-debug(-llvm) 2026-01-05 16:50:46 +01:00
Alex Rønne Petersen 00dc4d000f test: add openbsd targets to module test matrix 2026-01-05 16:50:46 +01:00
Alex Rønne Petersen 25e348973a std.zig.target: add openbsd libc support 2026-01-05 16:50:46 +01:00
Alex Rønne Petersen a78f891d05 compiler: support building openbsd crt0 and stub shared libraries
closes #2878
2026-01-05 16:50:46 +01:00
Alex Rønne Petersen 00e6895bde compiler: don't error on explicit link_libc=false on requiresLibC() targets
There are various reasons why one might want to still create libc-less
compilations on these targets. Case in point: Compiling our bundled crt0 for
OpenBSD.

We will still default to linking libc on these targets, though.
2026-01-05 16:50:46 +01:00
Alex Rønne Petersen d0ad76c03c update_openbsd_libc: add tool for updating openbsd libc startup code 2026-01-05 16:50:44 +01:00
Alex Rønne Petersen 50422d5c37 Merge pull request 'libc: remove most symbols already present in compiler_rt' (#30648) from mercenary/zig:2879-rt into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30648
Reviewed-by: Andrew Kelley <andrewrk@noreply.codeberg.org>
Reviewed-by: Alex Rønne Petersen <alex@alexrp.com>
2026-01-05 15:49:55 +01:00
Alex Rønne Petersen 6f2e7afc30 ci: build stage4 and run behavior tests with it on aarch64-macos-debug
We do this in most other debug jobs, so seems sensible to do here too.
2026-01-05 15:41:16 +01:00
Alex Rønne Petersen faa485e630 ci: build stage4 and run behavior tests with it on x86_64-linux-debug(-llvm)
This was removed in 125a9aa82b. But now that our
x86_64-linux machines have had their resources properly allocated, resulting in
runs taking 1-3 hours rather than 4-8, we can add this back.
2026-01-05 15:41:16 +01:00
Alex Rønne Petersen 4d3a847cd1 libc: add openbsd libc startup code for 7.8 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 9f16886536 compiler: define ___OpenBSD and OpenBSDX_Y when targeting openbsd libc 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 2c42b85529 std.zig.target: handle openbsd libc names 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 395145d3b0 std.zig.LibCDirs: add openbsd support 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 504de5c887 std.Target: bump baseline openbsd version from 7.7 to 7.8
Since this is the first version we support cross-compiling for.
2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 39bb452d96 std.Target: factor arch/abi into openbsd minimum version logic 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 32b250109f std.Target: add isOpenBSDLibC() 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen de13923d69 libc: add openbsd 7.8 abilists 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 66d97267c7 libc: add openbsd 7.8 headers
This excludes all headers in /usr/include/dev because that directory is bonkers
huge (18M). We can add these on an as-needed basis.
2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 834ac8122b process_headers: add openbsd support 2026-01-05 14:52:48 +01:00
Alex Rønne Petersen 962903e0fa ci: bump riscv64-linux timeouts by 2 hours
Fixing this perf regression is tracked by: https://codeberg.org/ziglang/zig/issues/30595
2026-01-05 12:54:27 +01:00
Alex Rønne Petersen ccc78252f1 std.Io.test: disable flaky recancel test on linux w/o libc
https://codeberg.org/ziglang/zig/issues/30592
2026-01-05 12:52:25 +01:00
Alex Rønne Petersen bbacf42837 std.Io.test: disable flaky Group.concurrent test on linux w/o libc
https://codeberg.org/ziglang/zig/issues/30096
2026-01-05 12:52:18 +01:00
Michael Dusan 31a6e83a7c openbsd: fix Io.Threaded bitrot 2026-01-05 11:28:57 +01:00
Gregory Mullen 29b9e24df7 add tls.ExtensionType.quic_transport_parameters = 57 2026-01-05 11:26:17 +01:00
Jacob Young ac64c75876 Dwarf: implement pointers to more comptime values
Closes #30600
Closes #30602
2026-01-05 11:24:48 +01:00
Andrew Kelley 8669898819 disable flaky test: aarch64-macos stage3/4 nondeterminism check
tracked by #30687
2026-01-04 23:43:19 -08:00
Andrew Kelley 435cd6f129 Merge pull request 'std.Build: adjust temp files API' (#30683) from std.Build-temp into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/30683
2026-01-05 06:02:25 +01:00