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

Implement raw-dylib for Windows #1345

Closed
bjorn3 opened this issue Feb 2, 2023 · 3 comments
Closed

Implement raw-dylib for Windows #1345

bjorn3 opened this issue Feb 2, 2023 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-windows Operating system: Windows

Comments

@bjorn3
Copy link
Member

bjorn3 commented Feb 2, 2023

This will require generating import libraries using the object crate. I don't know what the exact format of import libraries is, but I do know that MSVC and MinGW use an incompatible format.

@bjorn3 bjorn3 added C-enhancement Category: An issue proposing an enhancement or a PR with one. O-windows Operating system: Windows labels Feb 2, 2023
@bjorn3
Copy link
Member Author

bjorn3 commented Jul 22, 2023

Rust 1.71.0 released which stabilizes this feature, so it might become high priority to implement this in the near future if windows-sys switches to it.

@bjorn3
Copy link
Member Author

bjorn3 commented Jul 25, 2024

rust-lang/ar_archive_writer#15 has ported LLVM's import library writer to rust. Using it from cg_clif produces identical import libraries as cg_llvm. It isn't enough however as we also need to match cg_llvm in when to use __imp_ dllimport symbols, which we currently never use.

tgross35 added a commit to tgross35/rust that referenced this issue Aug 7, 2024
…, r=jieyouxu

Make create_dll_import_lib easier to implement

This will make it easier to implement raw-dylib support in cg_clif and cg_gcc. This PR doesn't yet include an create_dll_import_lib implementation for cg_clif as I need to correctly implement dllimport in cg_clif first before raw-dylib can work at all with cg_clif.

Required for rust-lang/rustc_codegen_cranelift#1345
tgross35 added a commit to tgross35/rust that referenced this issue Aug 7, 2024
…, r=jieyouxu

Make create_dll_import_lib easier to implement

This will make it easier to implement raw-dylib support in cg_clif and cg_gcc. This PR doesn't yet include an create_dll_import_lib implementation for cg_clif as I need to correctly implement dllimport in cg_clif first before raw-dylib can work at all with cg_clif.

Required for rust-lang/rustc_codegen_cranelift#1345
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 7, 2024
…, r=jieyouxu

Make create_dll_import_lib easier to implement

This will make it easier to implement raw-dylib support in cg_clif and cg_gcc. This PR doesn't yet include an create_dll_import_lib implementation for cg_clif as I need to correctly implement dllimport in cg_clif first before raw-dylib can work at all with cg_clif.

Required for rust-lang/rustc_codegen_cranelift#1345
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Aug 7, 2024
Rollup merge of rust-lang#128206 - bjorn3:import_lib_writing_refactor, r=jieyouxu

Make create_dll_import_lib easier to implement

This will make it easier to implement raw-dylib support in cg_clif and cg_gcc. This PR doesn't yet include an create_dll_import_lib implementation for cg_clif as I need to correctly implement dllimport in cg_clif first before raw-dylib can work at all with cg_clif.

Required for rust-lang/rustc_codegen_cranelift#1345
@bjorn3
Copy link
Member Author

bjorn3 commented Aug 8, 2024

Implemented in #1524.

@bjorn3 bjorn3 closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. O-windows Operating system: Windows
Projects
None yet
Development

No branches or pull requests

1 participant