652 Commits
Author SHA1 Message Date
Matthew Lugg f6751410e9 build: run some tests with -flegalize-all
It's useful to run both a little-endian and a big-endian target here,
because some legalizations are susceptible to endianness bugs, e.g. any
related to bitwise operations or to `packed` (aka `bitpack`) types.

When modifying legalizations or adding new ones, they can be tested by
running `zig build test-modules -Donly-legalize` to limit to the targets
which pass `-flegalize-all`.

This makes it much easier to facilitate external contributions towards
https://codeberg.org/ziglang/zig/issues/36719, and will prevent
legalization passes from bit-rotting in the future.
2026-10-26 14:17:03 +00:00
Alex Rønne Petersen a79c0e383c test: stop using long-calls on thumb
No longer necessary since we use -ffunction-sections.
2026-10-26 11:02:42 +01:00
Alex Rønne Petersen 60064a5ba8 compiler: stop using long-calls on hexagon
No longer necessary since LLD supports thunks and we use -ffunction-sections.
2026-10-26 11:02:42 +01:00
Alex Rønne Petersen 9092424fc3 make -ffunction-sections and -fdata-sections resolved config options
In preparation for giving them defaults that depend on the target and backend.
2026-10-26 11:02:42 +01:00
Alex Rønne Petersen 030831549b update_cpu_features: remove some hexagon codegen options 2026-10-26 11:02:42 +01:00
Matthew Lugg 8d6c05f8ec link.Lld: fix linking ELF shared libraries with -l on Windows
In Zig 0.17.0, we started lowering these to `-L/ -l:/path/to/lib.so` in
the LLD invocation, but that obviously doesn't work on Windows. Luckily,
LLD's, uh, curious approach to path concatenation means that we can just
pass `-L ""` instead of `-L/` and everything works.

Resolves: https://codeberg.org/ziglang/zig/issues/37257
2026-10-26 10:26:58 +01:00
Andrew Kelley def373ed78 Merge pull request 'llvm: pass some behavior tests (30%) for spirv target' (#37300) from alichraghi/zig:llvm-spirv into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37300
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-10-24 22:34:19 +02:00
Alex Rønne Petersen 457e906bb3 build: add -Dskip-cbe option for skipping CBE tests 2026-10-23 11:04:37 +02:00
Ali Cheraghi b60a4af44c llvm: fix blocking issues to get tests running 2026-10-23 09:18:03 +03:30
Andrew Kelley 70c86e11c4 Merge pull request 'wasm: static archive + codegen fixes' (#37308) from pavelverigo/zig:wasm-fix-comp into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/37308
Reviewed-by: Andrew Kelley <andrew@ziglang.org>
2026-10-23 03:20:59 +02:00
Alex Rønne Petersen 1c5c725431 remove mips64el-openbsd support
OpenBSD 8.0 dropped this target.
2026-10-21 19:49:58 +02:00
Jacob Young 3cc4f2f0dc test/llvm-targets: convert to new runner 2026-10-21 10:05:31 -07:00
Jacob Young 1157dd9571 test/llvm-ir: convert to new runner 2026-10-21 10:05:30 -07:00
Jacob Young 809fcd4910 test/Runner: support more syntax for command contents 2026-10-21 10:05:29 -07:00
Pavel Verigo 2d361f612b wasm: test and fix compilation of mvp/lime1/wasm_v3_0 mcpu 2026-10-20 23:10:13 +02:00
Andrew Kelley 21141cb88a Revert "allow standardOptimizeOption to return null"
This reverts commit aa8c774e0f.

In retrospect, the breaking change is quite invasive and I don't think
we have fully considered the alternatives.
2026-10-17 12:25:32 -07:00
Alex Rønne Petersen d4984092a3 test: add sparc64-openbsd-none to module tests 2026-10-11 15:00:50 +02:00
Alex Rønne Petersen 38c1536b96 test-standalone: respect -Dskip-non-native in cross-compiling tests
closes https://github.com/ziglang/zig/issues/25471
2026-10-10 08:36:08 +02:00
Alex Rønne Petersen 93316d6e61 std.zig.target: move isNative() here from test harness 2026-10-10 08:36:08 +02:00
Kendall Condon aa8c774e0f allow standardOptimizeOption to return null
In order to allow the compiler to default to ReleaseSafe when compiling
for fuzzing, Build.standardOptimizeOption has been changed to return an
optional value.
2026-10-09 10:14:16 +02:00
Alex Rønne Petersen 35accc06ed test: don't claim compatibility for 32-bit RISC-V on 64-bit RISC-V 2026-10-09 09:33:50 +02:00
Alex Rønne Petersen 40a0d70b81 test: don't claim compatibility for 32-bit ARM on AArch64 2026-10-09 09:26:33 +02:00
Alex Rønne Petersen f587d753d1 test: remove max_rss special cases 2026-10-08 13:53:06 +02:00
Alex Rønne Petersen 25a375d358 test: don't compare aarch64/arm feature sets in isNative()
They are distinct families with their own feature bits.
2026-10-08 13:52:53 +02:00
Alex Rønne Petersen 5e96f6e102 test: refactor compatible32bitArch() -> supportedCompatArch()
Also fix some inaccuracies in it.
2026-10-08 13:52:53 +02:00
Alex Rønne Petersen 02488d96d6 test: re-enable stack protector for compiler-rt and libc tests on non-PowerPC
PowerPC is still affected by https://github.com/llvm/llvm-project/issues/195561.

closes https://codeberg.org/ziglang/zig/issues/31702
2026-10-07 00:30:52 +02:00
Alex Rønne Petersen 4bf080551c Revert "llvm: workaround crash on large inline memset"
This reverts commit 84c2d809ec.

closes https://codeberg.org/ziglang/zig/issues/31701
2026-10-07 00:30:52 +02:00
Alex Rønne Petersen 53173d25ab std.Target: update CPU models and features to LLVM 23 2026-10-07 00:30:51 +02:00
Alex Rønne Petersen 5e754304de remove support for wasi-libc
closes https://github.com/ziglang/zig/issues/9342
closes https://github.com/ziglang/zig/issues/15005
closes https://github.com/ziglang/zig/issues/20747
closes https://github.com/ziglang/zig/issues/22570
closes https://codeberg.org/ziglang/zig/issues/30977
2026-10-04 18:23:18 +02:00
Jacob Young 655bee8c75 test: convert debugger tests to new runner 2026-10-02 09:10:10 -04:00
Jacob Young 4dd645fddd Runner: add --libc-runtimes support 2026-09-26 19:08:50 -04:00
Jacob Young 9fe0ebe108 Threaded: implement process spawning for macOS 2026-09-26 19:08:50 -04:00
Jacob Young b6f68ca4ba Runner: implement cbe backend 2026-09-26 19:08:50 -04:00
Jacob Young ec261c5e8d test-incremental: convert tests to new format 2026-09-26 19:08:50 -04:00
Jacob Young 4e4e8902e5 Build: fix UAF of step names 2026-09-26 19:08:50 -04:00
Jacob Young 488c15320b runner: spawn compiler process 2026-09-26 19:08:50 -04:00
Jacob Young 8a6475c4f7 test-new-incremental: combine targets into a single Run step
Since the test protocol Client supports crashing step recovery,
we can just model this as multiple tests in one binary.
2026-09-26 19:08:50 -04:00
Jacob Young 207c883bfb runner: implement skip commands 2026-09-26 19:08:50 -04:00
Jacob Young 11958a306f test: implement new runner 2026-09-26 19:08:50 -04:00
Alex Rønne Petersen 476efc5b70 remove internal and link_once global linkages
These have no clear use case, no coherent definition, and incomplete/broken
compiler and linker support.

If actually needed, they can be reintroduced if someone can present a reasonable
use case along with a plan for how they should be implemented consistently in
all backends and linkers.
2026-09-26 19:12:48 +02:00
Alex Rønne Petersen ba90aae529 test: stop testing thumb-windows
This target is effectively dead. We'll keep it on life support in the compiler
and standard library, but there's no reason to waste CI resources on it at this
stage.
2026-09-23 13:42:28 +02:00
Alex Rønne Petersen 0d20454691 test: enable sparc64-linux-gnu module tests 2026-09-23 13:08:56 +02:00
Andrew Kelley 7eca05812a build.zig: update API usage 2026-09-16 13:12:47 -07:00
Alex Rønne Petersen facb6b9a62 disable cbe module tests on aarch64-openbsd
https://codeberg.org/ziglang/zig/issues/36766
2026-09-05 20:51:04 +02:00
kcbanner ab30a0b9a0 Coff: Incremental progress (#36706)
Making progress on incremental support in the COFF linker:

- Support reloc deletion by replacing them with .ABSOLUTE relocs (actually using the relocs from the free list will come later)
- Fixup setting sizes during incremental updates
- Fix incorrect modifications to the target_relocs linked list, add clarifying docs
- Enable `x86_64-windows-selfhosted` for test-incremental

Closes https://codeberg.org/ziglang/zig/issues/31773

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/36706
2026-09-05 07:06:21 +02:00
Jacob Young 980bf80036 Dwarf2: add testing and enable passing tests
- fix some bit-rotted documentation
- fix some non-determinism that was causing these tests to be flaky
- also update padding on moved/resized events
- make `unit_padding` a header node
- refactor out `ifPos`
2026-09-03 13:00:54 -04:00
Jacob Young 566b6a6ec0 Dwarf2: finish type debug info 2026-09-03 12:59:38 -04:00
Alex Rønne Petersen 6534993573 test-link: respect various skip options properly
Also use the smarter isNative() function.
2026-08-30 09:00:59 +02:00
Alex Rønne Petersen ceca6cca16 test-incremental: respect -Dskip-non-native and other similar options 2026-08-30 08:46:46 +02:00
Alex Rønne Petersen a583d26e70 compiler: disable self-hosted backend for x86_64-macos by default
https://codeberg.org/ziglang/zig/issues/35267

This was already the case before b66fe565db since
isBSD() includes isDarwin() - a great example of why that function is bad,
because it was not intended for Darwin platforms to be included in that check.

Anyway, we now *do* want to disable the self-hosted backend for this target due
to the aforementioned linker bug, but let's actually be intentional about it.
2026-08-25 13:53:20 +02:00