Skip to content

Use ICF for macOS release builds#25780

Draft
zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:zb/macos-icf-release-builds
Draft

Use ICF for macOS release builds#25780
zaniebot wants to merge 1 commit into
astral-sh:mainfrom
zaniebot:zb/macos-icf-release-builds

Conversation

@zaniebot

@zaniebot zaniebot commented Jun 9, 2026

Copy link
Copy Markdown

Summary

Use Rust's bundled Mach-O LLD with --icf=safe for macOS release builds.

The workflow scopes the linker flags to the macOS wheel builds.

Related uv change: astral-sh/uv#19615

CI Results

Build binaries run: https://github.com/astral-sh/ruff/actions/runs/27213897587

Measured with a same-commit A/B release build on a Namespace macOS ARM machine, using maturin 1.13.3 and Rust 1.96. The x86_64 row was cross-built from the ARM machine.

Target Binary size Binary delta Wheel size Wheel delta
macos-x86_64 24.32 MiB -0.38 MiB (-1.52%) 10.51 MiB -0.10 MiB (-0.92%)
macos-aarch64 22.35 MiB -0.19 MiB (-0.84%) 9.95 MiB -0.04 MiB (-0.37%)

The binary size measures installed/on-disk impact; the wheel size measures network/download size.

@zaniebot zaniebot force-pushed the zb/macos-icf-release-builds branch from 1dc7822 to 8e38a4b Compare June 9, 2026 16:48
@zaniebot zaniebot force-pushed the zb/macos-icf-release-builds branch from 8e38a4b to e0eb28d Compare June 9, 2026 16:56
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