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

Prefer target.env values over build.env config. #781

Merged
merged 1 commit into from
Jun 11, 2022

Conversation

Alexhuszagh
Copy link
Contributor

We currently use build.env over target.$(...).env, which means we cannot set a default value and then override it for a specific target. Given the following config file:

[build.env]
xargo = true

[target.aarch64-unknown-linux-gnu.env]
xargo = false

We currently would use xargo even on aarch64-unknown-linux-gnu, when we should not, and only use xargo for every other target.

Closes #773.

@Alexhuszagh Alexhuszagh requested a review from a team as a code owner June 11, 2022 02:15
@Alexhuszagh Alexhuszagh added the A-config Area: cross-toml config label Jun 11, 2022
We currently use `build.env` over `target.$(...).env`, which means we
cannot set a default value and then override it for a specific target.
Given the following config file:

```toml
[build.env]
xargo = true

[target.aarch64-unknown-linux-gnu.env]
xargo = false
```

We currently would use `xargo` even on `aarch64-unknown-linux-gnu`, when
we should not, and only use `xargo` for every other target.

Closes cross-rs#773.
Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@otavio otavio added this to the v0.2.2 milestone Jun 11, 2022
@bors
Copy link
Contributor

bors bot commented Jun 11, 2022

Build succeeded:

@bors bors bot merged commit b282a83 into cross-rs:main Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config Area: cross-toml config
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Environment Variable/Config Logic
3 participants