Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The structure definition of dllimport seems to lack information and is not enough to generate an undecorated lib. #124956

Open
han1548772930 opened this issue May 10, 2024 · 3 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@han1548772930
Copy link

han1548772930 commented May 10, 2024

Where rust calls llvm, the symbolname is left blank, which makes the structure definition of dllimport seem to lack information and is not enough to generate an undecorated lib.
FBCB13F97186228859BF21CB085FD4BA

{D68F8C74-9B96-A55C-E70C-ECE8D5F008CB}

712E7975E74D9587542E2CE1F801611A
9704252B8B4EA78E8088CAA9F83B871F

@han1548772930 han1548772930 added the C-bug Category: This is a bug. label May 10, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 10, 2024
@bjorn3
Copy link
Member

bjorn3 commented May 11, 2024

Can you post a rust code snippet on which you are experiencing the issue and show the exact issue (linker error, other kind of compilation failure, ...)

@han1548772930
Copy link
Author

#124958

@han1548772930 han1548772930 reopened this May 13, 2024
@jieyouxu jieyouxu added A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 13, 2024
@dpaoliello
Copy link
Contributor

I addressed this in #124958 (comment)

To summarize for this specific part of the issue:

  • Not setting SymbolName is a fair criticism, but I wouldn't want to change it now without an MCP and a motivating example where Rust has incorrect behavior.
  • You've demonstrated that Rust produces a different import library than MSVC or Clang but have not explained why this is an issue.

@saethlin saethlin added the O-windows Operating system: Windows label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. C-bug Category: This is a bug. O-windows Operating system: Windows T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants