Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow setting codegen-backend per-target #13001

Closed
flippette opened this issue Nov 19, 2023 · 1 comment
Closed

allow setting codegen-backend per-target #13001

flippette opened this issue Nov 19, 2023 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@flippette
Copy link

flippette commented Nov 19, 2023

Problem

i'm currently testing the codegen-backend option, but every target besides x86_64-unknown-linux-gnu does not work with cranelift. i would like to be able to select the backend for each individual target, or even better, for each cfg() target.

Proposed Solution

add a codegen-backend field to [target.<triple>] and [target.<cfg-expr>] sections.

Notes

p.s. would also be nice if we could somehow do something akin to

[target.x86_64-unknown-linux-gnu.profile.dev]
codegen-backend = "cranelift"
@flippette flippette added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels Nov 19, 2023
@weihanglo
Copy link
Member

I consider this as a subset of #4897, so close in favor of that.

In the mean time, you can use "custom profile" instead. A bit more typing but should work.

Feel free to add more comments here or there if you have any further question :)

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants