Skip to content

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

Merged
bors merged 2 commits into
rust-lang:masterfrom
japaric:target-rustflags
Oct 5, 2016
Merged

bors merged 2 commits into
rust-lang:masterfrom
japaric:target-rustflags

Conversation

@japaric

@japaric japaric commented Oct 4, 2016

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

Thanks! Could you also add some docs for this?

@alexcrichton

Copy link
Copy Markdown
Member

cc @rust-lang/tools

@japaric

japaric commented Oct 5, 2016

Copy link
Copy Markdown
Contributor Author

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

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

Thanks!

@bors

bors commented Oct 5, 2016

Copy link
Copy Markdown
Contributor

📌 Commit ef727b7 has been approved by alexcrichton

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

bors commented Oct 5, 2016

Copy link
Copy Markdown
Contributor

⌛ 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

bors commented Oct 5, 2016

Copy link
Copy Markdown
Contributor

☀️ 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