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

Projects
None yet
3 participants
@japaric
Member

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!

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

japaric added a commit to japaric/xargo that referenced this pull request Oct 4, 2016

@japaric japaric referenced this pull request Oct 4, 2016

Merged

per target rustflags #53

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Oct 4, 2016

Thanks! Could you also add some docs for this?

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Oct 4, 2016

cc @rust-lang/tools

@japaric

This comment has been minimized.

Member

japaric commented Oct 5, 2016

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

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Oct 5, 2016

@bors: r+

Thanks!

@bors

This comment has been minimized.

Contributor

bors commented Oct 5, 2016

📌 Commit ef727b7 has been approved by alexcrichton

@bors

This comment has been minimized.

Contributor

bors commented Oct 5, 2016

⌛️ Testing commit ef727b7 with merge 85df188...

bors added a commit that referenced this pull request Oct 5, 2016

Auto merge of #3157 - japaric:target-rustflags, r=alexcrichton
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

This comment has been minimized.

Contributor

bors commented Oct 5, 2016

@bors bors merged commit ef727b7 into rust-lang:master Oct 5, 2016

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment