Skip to content

fix(build): use zig archive tools for cross builds#2014

Merged
TaylorMutch merged 1 commit into
mainfrom
fix-zig-cross-archive-tools
Jun 26, 2026
Merged

fix(build): use zig archive tools for cross builds#2014
TaylorMutch merged 1 commit into
mainfrom
fix-zig-cross-archive-tools

Conversation

@TaylorMutch

Copy link
Copy Markdown
Collaborator

Summary

Fix local cross-compilation of bundled Z3 by configuring the Zig CMake toolchain with Zig-backed ar and ranlib wrappers. This prevents macOS /usr/bin/ar/ranlib from producing invalid archives for Linux targets during local Helm/Skaffold image builds.

Related Issue

N/A

Changes

  • Generate ar and ranlib wrappers next to the existing Zig cc/c++ wrappers.
  • Set CMAKE_AR and CMAKE_RANLIB in the generated CMake toolchain file.
  • Export target-specific AR_* and RANLIB_* variables for build scripts that honor them.

Testing

  • tasks/scripts/setup-zig-cc-wrapper.sh aarch64-unknown-linux-gnu.2.28 aarch64-unknown-linux-gnu.2.28 /private/tmp/openshell-zig-wrapper-pr-check
  • mise run pre-commit passes

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

Signed-off-by: Taylor Mutch <taylormutch@gmail.com>
@TaylorMutch TaylorMutch enabled auto-merge (squash) June 26, 2026 19:02

@maxamillion maxamillion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TaylorMutch TaylorMutch merged commit 7e0cce4 into main Jun 26, 2026
32 checks passed
@TaylorMutch TaylorMutch deleted the fix-zig-cross-archive-tools branch June 26, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants