Open
Description
In #5904, LTO was added to our release profile. However, in #5984, this failed for just the ppc64le musl cross build (which uses the nightly toolchain):
error: failed to get bitcode from object file for LTO (could not find requested section)
error: could not compile `uv` (bin "uv") due to 1 previous error
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO "cargo" "rustc" "--features" "self-update" "--target" "powerpc64le-unknown-linux-musl" "--message-format" "json-render-diagnostics" "--locked" "--manifest-path" "/home/runner/work/uv/uv/crates/uv/Cargo.toml" "--release" "--bin" "uv" "--" "-C" "link-arg=-s"`
I unsuccessfully tried using -Cembed-bitcode=yes
(rust-osdev/cargo-xbuild#73) to workaround this, before creating a separate release profile (release-no-lto
) with LTO disabled and using it for just this build (f0ffda4).
I'm not anywhere near an expert at Rust compilation options. Someone else should validate this approach and explore alternatives.