Skip to content
12 changes: 12 additions & 0 deletions .github/workflows/build-release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ jobs:
args: --release --locked --out dist --features self-update --compatibility pypi
env:
CARGO: ${{ github.workspace }}/scripts/cargo.sh
# Use Rust's bundled Mach-O LLD, which supports ICF.
# ICF reduces the macOS x86_64 uv binary size by ~2%.
RUSTFLAGS: "-C linker=rust-lld -C linker-flavor=ld64.lld -C link-arg=--icf=safe"
- name: "Upload wheels"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down Expand Up @@ -145,6 +148,9 @@ jobs:
args: --profile minimal-size --locked --out crates/uv-build/dist -m crates/uv-build/Cargo.toml --compatibility pypi
env:
CARGO: ${{ github.workspace }}/scripts/cargo.sh
# Use Rust's bundled Mach-O LLD, which supports ICF.
# ICF reduces the macOS x86_64 uv-build binary size by ~0.7%.
RUSTFLAGS: "-C linker=rust-lld -C linker-flavor=ld64.lld -C link-arg=--icf=safe"
- name: "Upload wheels uv-build"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down Expand Up @@ -179,6 +185,9 @@ jobs:
args: --release --locked --out dist --features self-update --compatibility pypi
env:
CARGO: ${{ github.workspace }}/scripts/cargo.sh
# Use Rust's bundled Mach-O LLD, which supports ICF.
# ICF reduces the macOS aarch64 uv binary size by ~1.4%.
RUSTFLAGS: "-C linker=rust-lld -C linker-flavor=ld64.lld -C link-arg=--icf=safe"
- name: "Test wheel - aarch64"
run: |
pip install ${PACKAGE_NAME} --no-index --find-links dist/ --force-reinstall
Expand Down Expand Up @@ -218,6 +227,9 @@ jobs:
args: --profile minimal-size --locked --out crates/uv-build/dist -m crates/uv-build/Cargo.toml --compatibility pypi
env:
CARGO: ${{ github.workspace }}/scripts/cargo.sh
# Use Rust's bundled Mach-O LLD, which supports ICF.
# ICF reduces the macOS aarch64 uv-build binary size by ~0.7%.
RUSTFLAGS: "-C linker=rust-lld -C linker-flavor=ld64.lld -C link-arg=--icf=safe"
- name: "Test wheel - aarch64"
run: |
pip install ${PACKAGE_NAME}_build --no-index --find-links crates/uv-build/dist --force-reinstall
Expand Down
Loading