Let custom codegen backends opt out of LTO #68349
Labels
A-codegen
Area: Code generation
A-cranelift
Things relevant to the [future] cranelift backend
A-linkage
Area: linking into static, shared libraries and binaries
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
For example cg_clif doesn't support LTO. Unfortunately enabling LTO makes the linker code always omit object files, so attempting to use
-Clto=yes
will result in a linker error. It is not practical to just not pass-Clto=yes
, as many crates enable it in theirCargo.toml
. I would like to be able to make cg_clif tell rustc that LTO should be disabled, even when-Clto=yes
is passed. I think there should still be a warning though.The text was updated successfully, but these errors were encountered: