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

Update build-std to support a boolean or array. #896

Closed
1 of 2 tasks
Alexhuszagh opened this issue Jul 1, 2022 · 0 comments · Fixed by #1488
Closed
1 of 2 tasks

Update build-std to support a boolean or array. #896

Alexhuszagh opened this issue Jul 1, 2022 · 0 comments · Fixed by #1488

Comments

@Alexhuszagh
Copy link
Contributor

Alexhuszagh commented Jul 1, 2022

Checklist

Describe your request

When using -Z build-std, cargo also enables you to pass various different flags which will specify the exact components to build, rather than all components. This can be useful if std isn't supported, but core and alloc are. Therefore, build-std could be provided as an array or bool (we shouldn't allow a table), and then passed transparent to -Z build-std.

[target.x86_64-unknown-dragonfly]
build-std = true

[target.thumbv6m-none-eabi]
build-std = ["core", "alloc"]

Describe why this would be a good inclusion for cross

Allows more comprehensive use of build-std, without breaking old behavior.

@Alexhuszagh Alexhuszagh self-assigned this Jul 1, 2022
@Alexhuszagh Alexhuszagh changed the title Update build-std to support a boolean or ` Update build-std to support a boolean or array. Jul 1, 2022
@Alexhuszagh Alexhuszagh added this to the v0.3.0 milestone Jul 4, 2022
github-merge-queue bot pushed a commit that referenced this issue May 9, 2024
Closes #896.

This is technically a breaking change because arbitrary strings passed
to the `CROSS_BUILD_STD` environment variable (e.g. `yes`) are now no
longer parsed as truthy values, but rather as a single crate name (or
multiple, if containing commas) to pass to `-Zbuild-std` (resulting in
e.g. `-Zbuild-std=yes`, which is invalid).
Behaviour remains the same when `CROSS_BUILD_STD` is set to `true`,
`false`, or a number that fits in an `i32`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant