Repository navigation
release, aarch64: add native Linux zigc (v*-zigc.*) release workflow and stage2_aarch64 fixes - #239
Merged
Merged
Conversation
cataggar
enabled auto-merge (squash)
November 11, 2026 20:42
…and stage2_aarch64 fixes
- Add `.github/workflows/build-zigc-release.yml` (for `v*-zigc.*` tags and
`workflow_dispatch`) to build `zigc-x86_64-linux-<ver>.tar.zst` and
`zigc-aarch64-linux-<ver>.tar.zst` without LLVM (`-Denable-llvm=false`)
using Zig's self-hosted native backends (`-Duse-llvm=false -Dcpu=baseline
-Dflat -Dno-langref -Doptimize=ReleaseSafe -Dstrip`), run smoke tests,
publish unsigned `.tar.zst` prerelease assets (no `.minisig`), and verify
coexisting `ghr install cataggar/zig@<tag> "?id=cataggar/zig/zigc"`.
- Add `scripts/package_zigc_bundle.py` and `scripts/test_package_zigc_bundle.py`
to validate static zero-libc ELF64 binaries (`PT_INTERP` absent, matching
`EM_X86_64` / `EM_AARCH64`), stage `zig` as `zigc` alongside full `lib/`,
`LICENSE`, and `README.md`, reject `.minisig` files, and compress
deterministically with `zstd -19 --zstd=wlog=23`.
- Fix `stage2_aarch64` self-hosted compiler bugs uncovered by native
`zigc-aarch64-linux` verification:
- Lower unpacked `@Vector` bitwise `.not`, `.bit_and`/`.bit_or`/`.xor`, and
`.splat` element-wise so non-power-of-two vectors (such as `@Vector(6, usize)`
in `std.Target.Cpu.Feature.Set.removeFeatureSet`) do not read past vector
elements or emit invalid `imms=63` `EOR` immediates.
- Copy live `f16` source registers before in-place `BIC` in `.abs` and pass
`src_mat.ra` in `.neg` when `!fullfp16` (`-Dcpu=baseline`).
- Emit tag stores in `.errunion_payload_ptr_set` and
`.optional_payload_ptr_set` even when the returned payload pointer is
unused (zero-sized payload structs such as `std.process.Preopens.init`).
- Avoid 340-byte by-value `EnumArray.get` copies on `LiveRegisters` in
`Select.zig` and enable `memcpyFast`/`memmoveFast` with `usize` elements on
`stage2_aarch64`.
- Update `README.md`, `doc/installation.md`, `doc/building.md`, and
`.github/*instructions*` for `zigc` (`v*-zigc.*`) releases.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
auto-merge was automatically disabled
November 11, 2026 22:33
Pull request was closed
cataggar
enabled auto-merge (squash)
November 11, 2026 22:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds native Linux
zigc(v*-zigc.*, e.g.v0.17.1-zigc.1) release automation onwazig— building Zig without the LLVM backend (-Denable-llvm=false) using Zig's own self-hosted native backends (-Duse-llvm=false) — along withstage2_aarch64fixes discovered during nativeaarch64-linuxverification.Release Workflow & Packaging
.github/workflows/build-zigc-release.yml:v*-zigc.*tag pushes andworkflow_dispatch.stage3-host(-Denable-llvm=false) from host Zig0.17.1without downloading any LLVM devkit, then compiles bothx86_64-linuxandaarch64-linuxrelease prefixes with-Dcpu=baseline -Dflat -Denable-llvm=false -Duse-llvm=false -Doptimize=ReleaseSafe -Dstrip -Dno-langref.zigc version,zigc env,zigc translate-c,zigc build-exe,zigc test,zigc build, cross-compilation (aarch64-linux/x86_64-linux), and WASI-lc(wasm32-wasi).zigc-x86_64-linux-<ver>.tar.zstandzigc-aarch64-linux-<ver>.tar.zstprerelease assets (no.minisig) and verifies coexistingghr install cataggar/zig@<tag> "?id=cataggar/zig/zigc".scripts/package_zigc_bundle.py&scripts/test_package_zigc_bundle.py:PT_INTERPabsent,EM_X86_64/EM_AARCH64), stageszig->zigcwith fulllib/,LICENSE, andREADME.md(build.ziguntouched), rejects.minisigfiles, and compresses deterministically withzstd -19 --zstd=wlog=23forghrcompatibility.stage2_aarch64&compiler_rtFixessrc/codegen/aarch64/Select.zig:@Vector.not,.bit_and/.bit_or/.xor, and.splatelement-wise so non-power-of-two vectors (such as@Vector(6, usize)instd.Target.Cpu.Feature.Set.removeFeatureSet) do not read past vector elements or emit invalidimms=63EORimmediates.f16source registers before in-placeBICin.absand passsrc_mat.rain.negwhen!fullfp16(-Dcpu=baseline)..errunion_payload_ptr_setand.optional_payload_ptr_seteven when the returned payload pointer is unused (e.g., zero-sized structs instd.process.Preopens.init).getPtrConstonLiveRegisters(EnumArray) to avoid 340-byte by-value struct copies in hot register allocation/call/merge loops.lib/compiler_rt.zig,lib/compiler_rt/{memcpy,memmove}.zig:usizePreferredLoadStoreElementonstage2_aarch64and enablememcpyFast/memmoveFastinstead of 1-bytememcpySmall/memmoveSmall.Verification
python3 -m unittest discover -s scripts -p 'test_package_*_bundle.py' -v(12/12 passed)zigc-x86_64-linux-0.17.1-zigc.1.tar.zst(34.8 MiB) andzigc-aarch64-linux-0.17.1-zigc.1.tar.zst(31.3 MiB) natively with-Denable-llvm=false -Duse-llvm=falsetest/behavior/{vector,floatop,error}.zigandlib/compiler_rt/{memcpy,memmove}.zigunder-fno-llvm -target aarch64-linux -mcpu=baseline -OReleaseSafe -fstripzigc translate-c,zigc build-exe,zigc test,zigc build, cross-compile,wasm32-wasi -lc,std.compress.zstd, and localghr install/ghr uninstall)