Detect LTO setting in build script
⚓ Rust 📅 2025-12-23 👤 surdeus 👁️ 4Is it possible to detect whether the current cargo profile has lto=true or not?
I have a workspace that has:
[profile.release]
lto = true
I can see that the output of the compilation with -vvv includes -C lto, but CARGO_ENCODED_RUSTFLAGS when printed from the buildscript never contains anything indicating lto. There seems to be previous suggestions that it should show up in that env var, but that doesnt seem to be true currently. Any ideas?
1 post - 1 participant
🏷️ Rust_feed