You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
configure: Use CARGO_CFG_*_{F16,F128} rather than invoking rustc
Currently we run `rustc` from the `RUSTC` environment variable to figure
out whether or not to enable `f16` and `f128`, based on the
`target_has_reliable_{f16,f128}` config. However, this does not know
about the codegen backend used, and the backend isn't trivial to check
in a build script (usually the backend gets set via `RUSTFLAGS`).
It turns out we don't actually need to run `rustc` here: Cargo
unconditionally emits all config from the relevant compiler as
`CARGO_CFG_*` variables, regardless of whether or not they are known
options. Switch to checking these to set config rather than invoking
`rustc`.
As an added advantage, we don't need any special handling for
target.json files.
Fixes: ed17b95 ("Use the compiler to determine whether or not to enable `f16` and `f128`")
0 commit comments