-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
add support for per-target rustflags in .cargo/config #3157
Conversation
you can now specify rustflags on a per-target basis in .cargo/config: ``` toml [target.x86_64-unknown-linux-gnu] rustflags = ["x86", "specific", "flags"] [target.arm-unknown-linux-gnueabi] rustflags = ["arm", "specific", "flags"] ``` If both build.rustflags and target.*.rustflags are specified, the target.* ones will be used. As before RUSTFLAGS overrides either set. closes rust-lang#3153
"backport" of rust-lang/cargo#3157
Thanks! Could you also add some docs for this? |
cc @rust-lang/tools |
@alexcrichton Done, I think. Is just config.md enough? |
@bors: r+ Thanks! |
📌 Commit ef727b7 has been approved by |
add support for per-target rustflags in .cargo/config you can now specify rustflags on a per-target basis in .cargo/config: ``` toml [target.x86_64-unknown-linux-gnu] rustflags = ["x86", "specific", "flags"] [target.arm-unknown-linux-gnueabi] rustflags = ["arm", "specific", "flags"] ``` If both build.rustflags and target.*.rustflags are specified, the target.* ones will be used. As before RUSTFLAGS overrides either set. closes #3153 r? @alexcrichton I've only added a smoke test and a precedence test. Let me know if I should add more tests!
☀️ Test successful - cargo-cross-linux, cargo-linux-32, cargo-linux-64, cargo-mac-32, cargo-mac-64, cargo-win-gnu-32, cargo-win-gnu-64, cargo-win-msvc-32, cargo-win-msvc-64 |
you can now specify rustflags on a per-target basis in .cargo/config:
If both build.rustflags and target..rustflags are specified, the
target. ones will be used.
As before RUSTFLAGS overrides either set.
closes #3153
r? @alexcrichton I've only added a smoke test and a precedence test. Let me know if I should add more tests!