I read the rest of the article, and it appears to have been partially written before support for codegen backends landing in cargo.
The latest progress report from bjorn3 includes additional details on how to configure Cargo to use the new backend by default, without an elaborate command-line dance.
Please, send an email to lwn@lwn.net to report this issue to them, they usually fix things quickly.
I read the rest of the article, and it appears to have been partially written before support for codegen backends landing in cargo.
That “latest progress report” has the relevant info ;)
So, basically, you would add this to the top of
Cargo.toml
:cargo-features = ["codegen-backend"]
Then add a custom profile, for example:
[profile.release-dev-cl] inherits = "release" lto = "off" debug = "full" codegen-backend = "cranelift"
Then build with:
cargo build --profile release-dev-cl