-
Notifications
You must be signed in to change notification settings - Fork 265
Fix compilation issues with clang without msvc linker #1460
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
Conversation
|
From a cursory read these changes most likely break clang-cl on Windows. |
Hello. Thank you. clang-cl also supports asm renaming things. clang and GCC they both support them even clang is targeting msvc. I am using this one: We have done for years for directly renaming even for clang-cl There are some questions for me on how the dllimport naming works on arm64ec, which is why I haven't changed that part yet. |
I triggered the CI to run. Your guess was a good one. Clang-Cl seems to be broken in cpp17 mode (cpp20 seems to be passing). |
Hi. I have checked that, and I think it is not the reason for C++20. I got the symbol wrong for i686. #if !defined(__clang__)
#define WINRT_IMPL_LINK(function, count) __asm__(#function "@" #count)
#define WINRT_IMPL_LINK2(function1, function2, count) __asm__(#function2 "@" #count)
#else
#define WINRT_IMPL_LINK(function, count) __asm__("_" #function "@" #count)
#define WINRT_IMPL_LINK2(function1, function2, count) __asm__("_" #function2 "@" #count)
#endifThis should be correct now. Can you start CI again? Thank you |
Fix i686 compilations Use SIZE_MAX <= UINT_LEAST32_MAX to ensure it is 32 bit target instead of 64 bit fix link2 for msvc since it needs link2 use link2 for WINRT_GetActivationFactory it is WINRT_IMPL_LINK2 for gcc and clang avoid dllimport for arm64ec since i do not know how the symbol works import runtimeobject.lib by default i messed up with gcc and clang for i686 fixed
They are for exporting, not importing
|
|
||
| WINRT_IMPL_EXTERN_C_END | ||
|
|
||
| extern "C" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this new block need the WINRT_IMPL_EXTERN_C_BEGIN / WINRT_IMPL_EXTERN_C_END treatment too?
|
This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
|
This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
What's this all about?
Fixes: #0000 ⬅️ Be sure to refer to an existing issue here!
I do cross-compiling for Windows binaries on Linux through clang 20
https://github.com/trcrsired/windows-msvc-sysroot
Here are some the issues I have found for clang x86_64/aarch64-windows-msvc for clang.
I am also adding dllimport to the imports too