-
Notifications
You must be signed in to change notification settings - Fork 585
Description
Summary
In a complex multi-language project, one may end up using both windows-target and the system libraries directly (that's the case of Firefox). When enabling windows-targets's support for raw-dylib, linking fails when using LLVM's lld-link (I haven't tried link.exe, it might actually work, but the result is probably suboptimal too). The cause for the link failure is possibly a bug in lld-link, but it is a manifestation of the fact that the fake import lib that rust creates with raw-dylib does not agree with the real system import lib, wrt symbol names: on 32-bits windows, the system import lib use the __imp__sym@n
form, while the raw-dylib uses the __imp_sym
form because of import_name_type = "undecorated"
.
See llvm/llvm-project#107371 (comment) for more details.
Removing import_name_type = "undecorated"
solves the problem.
Crate manifest
No response
Crate code
No response