-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
CARGO_CFG_TARGET_HAS_ATOMIC{,_LOAD_STORE}
are empty strings (with Rust nightly)
#11789
Labels
C-bug
Category: bug
Comments
vadorovsky
added a commit
to vadorovsky/cargo
that referenced
this issue
Mar 2, 2023
When a rustc cfg is defined both with and without value, the environment variable should provide all the values. Before this change, it ended up being empty. Fixes: rust-lang#11789
vadorovsky
added a commit
to vadorovsky/cargo
that referenced
this issue
Mar 3, 2023
When a rustc cfg is defined both with and without value, the environment variable should provide all the values. Before this change, it ended up being empty. Fixes: rust-lang#11789
vadorovsky
added a commit
to vadorovsky/cargo
that referenced
this issue
Mar 3, 2023
When a rustc cfg is defined both with and without value, the environment variable should provide all the values. Before this change, it ended up being empty. Fixes: rust-lang#11789
vadorovsky
added a commit
to vadorovsky/cargo
that referenced
this issue
Mar 3, 2023
When a rustc cfg is defined both with and without value, the environment variable should provide all the values. Before this change, it ended up being empty. Fixes: rust-lang#11789
bors
added a commit
that referenced
this issue
Mar 6, 2023
Fix `CARGO_CFG_` vars for configs defined both with and without value When a rustc cfg is defined both with and without value, the environment variable should provide all the values. Before this change, it ended up being empty. Fixes: #11789
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
In the current Rust nightly, the cfg for atomics usually looks like:
The configs are defined both with values (e.g.
target_has_atomic="16"
to indicate that the target supports atomics for 16 bit types) and without values (e.g.target_has_atomic
to indicate that the target supports atomics in general, for at least one type / size in bytes).That change in rustc was made in this PR: rust-lang/rust#106856
However, that change made the
CARGO_CFG_TARGET_HAS_ATOMIC{,_LOAD_STORE}
environment variables empty.Steps
build.rs
:The expected, correct output would be rather:
Possible Solution(s)
When there is a cfg in Rustc which is defined both with and without value, I think we should keep the values as an environment variables.
For example, for the following cfg:
Cargo should produce the following env variable:
Notes
No response
Version
The text was updated successfully, but these errors were encountered: