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 #3153
japaric pushed a commit to japaric/xargo that referenced this pull request Oct 4, 2016
Jorge Aparicio
"backport" of rust-lang/cargo#3157
@alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Oct 4, 2016

Thanks! Could you also add some docs for this?

@alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Oct 4, 2016

cc @rust-lang/tools

@japaric
Copy link
Member Author

@japaric japaric commented Oct 5, 2016

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

@alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Oct 5, 2016

@bors: r+

Thanks!

@bors
Copy link
Contributor

@bors bors commented Oct 5, 2016

📌 Commit ef727b7 has been approved by alexcrichton

@bors
Copy link
Contributor

@bors 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
Contributor

@bors bors commented Oct 5, 2016

@bors bors merged commit ef727b7 into rust-lang:master Oct 5, 2016
2 of 3 checks passed
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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants