diff options
| author | Trevor Gross <tmgross@umich.edu> | 2025-08-05 20:56:27 +0000 |
|---|---|---|
| committer | Trevor Gross <tmgross@umich.edu> | 2025-08-05 21:17:03 +0000 |
| commit | fbc700f92bdb008a9fd76e2a02230cea6c23d2c4 (patch) | |
| tree | db6fec888e1a2fe4b4e0b9e2c184a9b48d6a4e26 /tests/rustdoc-js-std/alias.js | |
| parent | ecf6d3c6ced41d71a09248fdc679309e39bae318 (diff) | |
| download | rust-fbc700f92bdb008a9fd76e2a02230cea6c23d2c4.tar.gz rust-fbc700f92bdb008a9fd76e2a02230cea6c23d2c4.zip | |
configure: Use `CARGO_CFG_*_{F16,F128}` rather than invoking rustc
Currently we run the `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 it 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 for setting config rather than
invoking `rustc`.
As an added advantage, this will work with target.json files without any
special handling.
Fixes: ed17b95715dd ("Use the compiler to determine whether or not to enable `f16` and `f128`")
Diffstat (limited to 'tests/rustdoc-js-std/alias.js')
0 files changed, 0 insertions, 0 deletions
