Skip to content

Commit

Permalink
Use a dedicated profile
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Aug 9, 2024
1 parent c54df0a commit cbc8024
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ dev = "run --package uv-dev"
# See: https://github.com/astral-sh/ruff/issues/11503
[target.'cfg(all(target_env = "msvc", target_os = "windows"))']
rustflags = ["-C", "target-feature=+crt-static"]

[target.powerpc64le-unknown-linux-musl]
lto = "off"
2 changes: 1 addition & 1 deletion .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ jobs:
with:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_1
args: --release --locked --out dist --features self-update ${{ matrix.platform.arch == 'aarch64' && '--compatibility 2_17' || ''}}
args: ${{ matrix.platform.arch == 'ppc64le' && '--release-no-lto' || '--release'}} --locked --out dist --features self-update ${{ matrix.platform.arch == 'aarch64' && '--compatibility 2_17' || ''}}
docker-options: ${{ matrix.platform.maturin_docker_options }}
rust-toolchain: ${{ matrix.platform.toolchain || 'stable' }}
env:
Expand Down
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,11 @@ rest_pat_in_fully_bound_structs = "warn"
strip = true
lto = "fat"

# This profile disables LTO and is used for ppc64le musl cross builds which fail otherwise
[profile.release-no-lto]
inherits = "release"
lto = false

# This profile is meant to mimic the `release` profile as closely as
# possible, but using settings that are more beneficial for iterative
# development. That is, the `release` profile is intended for actually
Expand Down

0 comments on commit cbc8024

Please sign in to comment.