diff --git a/.cargo/config.toml b/.cargo/config.toml index 47f74e34dc77..9c7d3a7588eb 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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" diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 045df2e119f1..aa5142ca3e3f 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -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' && '--profile 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: diff --git a/Cargo.toml b/Cargo.toml index 1da88e1e21fe..87d43c895785 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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