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

add support for per-target rustflags in .cargo/config #3157

Merged
merged 2 commits into from
Oct 5, 2016

Conversation

japaric
Copy link
Member

@japaric japaric commented Oct 4, 2016

you can now specify rustflags on a per-target basis in .cargo/config:

[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!

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
japaric pushed a commit to japaric/xargo that referenced this pull request Oct 4, 2016
@alexcrichton
Copy link
Member

Thanks! Could you also add some docs for this?

@alexcrichton
Copy link
Member

cc @rust-lang/tools

@japaric
Copy link
Member Author

japaric commented Oct 5, 2016

@alexcrichton Done, I think. Is just config.md enough?

@alexcrichton
Copy link
Member

@bors: r+

Thanks!

@bors
Copy link
Collaborator

bors commented Oct 5, 2016

📌 Commit ef727b7 has been approved by alexcrichton

@alexcrichton alexcrichton added the relnotes Release-note worthy label Oct 5, 2016
@bors
Copy link
Collaborator

bors commented Oct 5, 2016

⌛ Testing commit ef727b7 with merge 85df188...

bors added a commit that referenced this pull request Oct 5, 2016
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!
@bors
Copy link
Collaborator

bors commented Oct 5, 2016

☀️ 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
Approved by: alexcrichton
Pushing 85df188 to master...

@bors bors merged commit ef727b7 into rust-lang:master Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Release-note worthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

per target rustflags
3 participants