Skip to content

scripts: replace QEMU emulation with cross-compilation for arm64 builds#448

Open
swasik wants to merge 2 commits into
scylladb:masterfrom
swasik:cross-compilation
Open

scripts: replace QEMU emulation with cross-compilation for arm64 builds#448
swasik wants to merge 2 commits into
scylladb:masterfrom
swasik:cross-compilation

Conversation

@swasik

@swasik swasik commented May 12, 2026

Copy link
Copy Markdown
Collaborator

Changes

  • Cross-compile arm64 binaries using gcc-aarch64-linux-gnu / g++-aarch64-linux-gnu instead of QEMU emulation
  • QEMU remains only for Docker image packaging (docker build --platform)
  • CARGO_BUILD_TARGET, CC_*, CXX_*, AR_*, CARGO_TARGET_*_LINKER env vars set correctly (underscore-normalized for cc crate compatibility)
  • Cross container runs as root (for apt-get), then chowns target dir back to host UID/GID
  • release_dir_for() helper resolves output path whether cross or native build
  • upload-release searches multiple candidate paths for tarballs
  • Dependency validation step moved from build-release to release (avoids duplicate checks)

Tests

Dependencies

Depends on #436

Fixes: VECTOR-665

swasik added 2 commits June 23, 2026 13:38
- Add unified release script that orchestrates tag, build, and upload
- Always pass version explicitly to build-release and upload-release
- Add --init to docker run for proper signal forwarding (Ctrl+C works)
- Add -t flag to docker run when stdout is a terminal
- Derive release target repo from origin remote
- Set gh repo default before upload to support fork workflows
- Add colored output to all release scripts (disabled in non-TTY)
- Print Copilot prompt for generating release notes after completion
- Update releasing.md documentation
- run-with-release-toolchain now uses native cross-compilation (gcc-aarch64-linux-gnu)
  instead of QEMU-emulated Docker containers, significantly reducing build time
- Cross-compiler, Rust target, CC/CXX/AR/linker env vars set automatically when
  TARGETARCH differs from host architecture
- build-release adds dependency validation step at the start
- Output paths handled dynamically (cross builds add target-triple subdir)
- upload-release searches multiple candidate paths for tarballs
- QEMU is still used for Docker image builds (--platform) but no longer for compilation
@swasik
swasik force-pushed the cross-compilation branch from 75ca6d3 to 2529c37 Compare June 23, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant