Skip to content

Use ICF for macOS release builds - #25780

Merged
charliermarsh merged 1 commit into
astral-sh:mainfrom
zaniebot:zb/macos-icf-release-builds
Jun 26, 2026
Merged

charliermarsh merged 1 commit into
astral-sh:mainfrom
zaniebot:zb/macos-icf-release-builds

Conversation

@zaniebot

@zaniebot zaniebot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

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
@zanieb
zanieb marked this pull request as ready for review June 26, 2026 16:21
@charliermarsh
charliermarsh merged commit 645dca3 into astral-sh:main Jun 26, 2026
62 checks passed
@charliermarsh charliermarsh added performance Potential performance improvement release Related to the release process (not for changelogs) labels Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Potential performance improvement release Related to the release process (not for changelogs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants