Files
rust/compiler/rustc_interface
Nicholas Nethercote 62578dfdde Fix the wasm32-unknown-unknown target feature/cfg bug
Currently, `parse_cfg` calls `build_configuration`, which calls
`default_configuration`, which calls
`sess.target.singlethread(&sess.internal_target_features)`. But
`sess.internal_target_features` hasn't been set at this point and is
empty!

This commit moves the setting of `sess.internal_target_features` before
the `parse_cfg` call to fix this ordering bug. This results in the
`cfg(target_has_threads)` being correctly set on
`wasm32-unknown-unknown` when `-Ctarget-feature=+atomics` is specified.

Note: I have plans to make this kind of ordering bug
difficult/impossible in a follow-up (e.g. #161432).
2026-08-25 20:53:11 +10:00
..
2026-08-21 10:33:56 +02:00