-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Let custom codegen backends opt out of LTO #68349
Copy link
Copy link
Open
Labels
A-codegenArea: Code generationArea: Code generationA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendA-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendA-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
For example cg_clif doesn't support LTO. Unfortunately enabling LTO makes the linker code always omit object files, so attempting to use
-Clto=yeswill 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=yesis passed. I think there should still be a warning though.