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

Conditional RUSTFLAGS in .cargo/config? #8768

Closed
jerryc05 opened this issue Oct 11, 2020 · 2 comments
Closed

Conditional RUSTFLAGS in .cargo/config? #8768

jerryc05 opened this issue Oct 11, 2020 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

Comments

@jerryc05
Copy link

Describe the problem you are trying to solve

I know that there is a [build] section in .cargo/config file that accepts rustflags, but the problem is, it is effective all the time.

I would like to use some rustflags ONLY under several profiles separately. For example, it would be best if there exists something equivalent to:

[build.dev]
rustflags = [
    "-Ctarget-cpu=native",
    # some other flags
]

Note that I only want those flags under RELEASE builds, and they shall have no effect under DEV builds.

Describe the solution you'd like

Probably a [build.dev] section?

Notes

@jerryc05 jerryc05 added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Oct 11, 2020
@jerryc05
Copy link
Author

Oops, just found a possible dup of this issue #7878 . Anyway, are we making progress on this feature request?

@ehuss
Copy link
Contributor

ehuss commented Oct 20, 2020

Closing as a duplicate of #7878.

@ehuss ehuss closed this as completed Oct 20, 2020
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`
Projects
None yet
Development

No branches or pull requests

2 participants