Skip to content

build(release): cross-compile the Linux aarch64 tools on x86_64 - #4242

Open
rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:cross_build_release_artifacts
Open

rickeylev wants to merge 1 commit into
bazel-contrib:mainfrom
rickeylev:cross_build_release_artifacts

Conversation

@rickeylev

Copy link
Copy Markdown
Collaborator

Building each release tool natively needs a GitHub runner per
platform. Cross-compiling on a Linux x86_64 runner instead lets us
add platforms that lack GitHub runners, e.g. other Linux CPUs, as
suggested in #4217's review.

The Linux aarch64 job now runs on an x86_64 runner and cross-compiles
for musl (aarch64-unknown-linux-musl) instead of glibc. Rust links
musl statically with its bundled rust-lld, so the build needs just a
dev-only Rust toolchain, not a C cross toolchain. macOS and Windows
files need those OSes' SDKs, so their jobs still build natively, and
Linux x86_64 keeps its static glibc build.

build.sh now takes the job's target triple and builds for the
matching platform in dev/platforms, so the workflow skips older refs
without it. release_files still picks the release flags, now from
the platform's OS and libc. verify.sh also checks the CPU of Linux
files, since one is now cross-compiled.

Work towards #4216

Building each release tool natively needs a GitHub runner per
platform. Cross-compiling on a Linux x86_64 runner instead lets us
add platforms that lack GitHub runners, e.g. other Linux CPUs, as
suggested in bazel-contrib#4217's review.

The Linux aarch64 job now runs on an x86_64 runner and cross-compiles
for musl (aarch64-unknown-linux-musl) instead of glibc. Rust links
musl statically with its bundled rust-lld, so the build needs just a
dev-only Rust toolchain, not a C cross toolchain. macOS and Windows
files need those OSes' SDKs, so their jobs still build natively, and
Linux x86_64 keeps its static glibc build.

build.sh now takes the job's target triple and builds for the
matching platform in dev/platforms, so the workflow skips older refs
without it. release_files still picks the release flags, now from
the platform's OS and libc. verify.sh also checks the CPU of Linux
files, since one is now cross-compiled.

Work towards bazel-contrib#4216
@rickeylev
rickeylev requested a review from aignas as a code owner October 10, 2026 05:47

This branch has not been deployed

No deployments
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