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

Fix implib name for *-pc-windows-gnullvm targets. #546

Closed
wants to merge 1 commit into from

Conversation

red-001
Copy link

@red-001 red-001 commented Aug 7, 2024

*-pc-windows-gnullvm targets only output a .dll file without the .lib file. Not all linkers for windows support linking directly against .dll's, configuring the linker correctly is left up to the user.

@jschwe
Copy link
Collaborator

jschwe commented Aug 7, 2024

Is there a corresponding clang target? I'm assuming that means gnu and gnullvm are not abi compatible, is that correct?

@red-001
Copy link
Author

red-001 commented Aug 8, 2024

Probably not ABI compatible, afaik one links against the GCC runtime and the other links against the LLVM runtime/Microsoft's Univerisal C Runtime. As for Clang targets - I'm not sure, my usecase was linking a cdynlib against a C++ project compiled with llvm-mingw .

if(is_windows_gnullvm)
_corrosion_set_imported_location("${target_name}-shared" "IMPORTED_IMPLIB"
"ARCHIVE_OUTPUT_DIRECTORY"
"${dynamic_lib_name}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just skip adding the IMPLIB artifact altogether? What does Cmake do for C++ sharedlibraries compiling with the corresponding C/C++ toolchain?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would need to look into what CMake does, the reason I set the artifact was to get it to pass the .dll path to the linker, might well be the wrong way to do it.

@jschwe
Copy link
Collaborator

jschwe commented Sep 4, 2024

#553 added a workaround to correctly copy the implib on gnullvm targets.

@jschwe jschwe closed this Sep 4, 2024
@red-001
Copy link
Author

red-001 commented Sep 4, 2024

thank you!

@red-001 red-001 deleted the fix_gnullvm_win_link branch September 4, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants