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 [target.'cfg(...)'] syntax in .cargo/config #3499

Closed
mbrubeck opened this issue Jan 5, 2017 · 1 comment · Fixed by #4279 or #3854
Closed

Allow [target.'cfg(...)'] syntax in .cargo/config #3499

mbrubeck opened this issue Jan 5, 2017 · 1 comment · Fixed by #4279 or #3854
Labels
A-configuration Area: cargo config files and env vars

Comments

@mbrubeck
Copy link
Contributor

mbrubeck commented Jan 5, 2017

In Cargo.toml there are two ways to specify target-specific dependencies:

But in .cargo/config there is only one way to specify target-specific rustc flags:

It would be useful if [target.'cfg(...)'] was supported here too, for use cases like:

[target.'cfg(target_arch = "x86")']
rustflags = ["-C", "target-feature=+ssse3"]
@alexcrichton
Copy link
Member

Seems reasonable to me!

@alexcrichton alexcrichton added the A-configuration Area: cargo config files and env vars label Jan 5, 2017
bors added a commit that referenced this issue Apr 4, 2017
Add `[target.'cfg(...)']` syntax for rustc(doc)flags in .cargo/config

Allow to use the Rust `cfg(...)` syntax to configure rust(doc)flags.
The flags are concatenated when a build matches several `cfg`, or
several `cfg` and a $triple.

Fix #3499.
@bors bors closed this as completed in #3854 Apr 4, 2017
bors added a commit that referenced this issue Jul 13, 2017
Fix support of `[target.'cfg(...)']` syntax for rustc and rustdoc flags

Support of `[target.'cfg(...)']` for rustc and rustdoc flags is buggy.
This adds meaningful tests and fixes the issue.

Fixes #3499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars
Projects
None yet
2 participants