]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #101738 - dpaoliello:linkname, r=petrochenkov
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>
Fri, 16 Sep 2022 05:47:00 +0000 (11:17 +0530)
committerGitHub <noreply@github.com>
Fri, 16 Sep 2022 05:47:00 +0000 (11:17 +0530)
commit61126d3611c173fce47954fc4bf4671a8cea3ce9
tree4a7d2e4e9853ebcab57c7d51fe9c02ffc0f64c42
parentb763cd53f4a2d2eedf043ff34954599b5941fa4d
parent3c184db386ee3e1c4a9ae1b46836d29d657d5f43
Rollup merge of #101738 - dpaoliello:linkname, r=petrochenkov

Fix `#[link kind="raw-dylib"]` to respect `#[link_name]`

Issue Details:
When using `#[link kind="raw-dylib"]` (#58713), the Rust compiler ignored any `#[link_name]` attributes when generating the import library and so the resulting binary would fail to link due to missing symbols.

Fix Details:
Use the name from `#[link_name]` if present when generating the `raw-dylib` import library, otherwise default back to the actual symbol name.
compiler/rustc_metadata/src/native_libs.rs