Skip to content

Commit c0e98de

Browse files
Rollup merge of rust-lang#130586 - dpaoliello:fixrawdylib, r=wesleywiser
Set "symbol name" in raw-dylib import libraries to the decorated name `windows-rs` received a bug report that mixing raw-dylib generated and the Windows SDK import libraries was causing linker failures: <microsoft/windows-rs#3285> The root cause turned out to be rust-lang#124958, that is we are not including the decorated name in the import library and so the import name type is also not being correctly set. This change modifies the generation of import libraries to set the "symbol name" to the fully decorated name and correctly marks the import as being data vs function. Note that this also required some changes to how the symbol is named within Rust: for MSVC we now need to use the decorated name but for MinGW we still need to use partially decorated (or undecorated) name. Fixes rust-lang#124958 Passing i686 MSVC and MinGW build: <https://github.com/rust-lang/rust/actions/runs/11000433888?pr=130586> r? `@ChrisDenton`
2 parents 051b774 + 83052d1 commit c0e98de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/archive.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::path::Path;
22

33
use rustc_codegen_ssa::back::archive::{
44
ArArchiveBuilder, ArchiveBuilder, ArchiveBuilderBuilder, DEFAULT_OBJECT_READER,
5+
ImportLibraryItem,
56
};
67
use rustc_session::Session;
78

@@ -16,7 +17,7 @@ impl ArchiveBuilderBuilder for ArArchiveBuilderBuilder {
1617
&self,
1718
_sess: &Session,
1819
_lib_name: &str,
19-
_import_name_and_ordinal_vector: Vec<(String, Option<u16>)>,
20+
_items: Vec<ImportLibraryItem>,
2021
_output_path: &Path,
2122
) {
2223
unimplemented!("creating dll imports is not yet supported");

0 commit comments

Comments
 (0)