mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
5c4ede88c6
miri: make sure we can find link_section statics even for the local crate Miri needs some way to iterate all the exported functions and "used" statics of all crates. For dependency crates, this already works fine since we can overwrite the query resonsible for computing `exported_symbols`, but it turns out for local binary crates this does not work: for binaries, `reachable_set` skips a lot of its logic and only checks `contains_extern_indicator()` and `RUSTC_STD_INTERNAL_SYMBOL`. Other flags like `CodegenFnAttrFlags::USED` are entirely ignored. This PR proposes to use the same check, `has_custom_linkage`, in binaries that we already use to drive the main workqueue of the reachability recursive traversal. I have no idea why binaries used a slightly different check that ignores `USED` -- was that deliberate or does it just not matter most of the time? |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
messages.ftl |