-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
[Windows/ARM64] Fix raycast/embree ARM64 build with LLVM/MinGW. #93364
Conversation
@@ -102,7 +102,9 @@ | |||
#include <stdint.h> | |||
#include <stdlib.h> | |||
|
|||
#if defined(_WIN32) | |||
// -- GODOT start -- | |||
#if defined(_WIN32) && !defined(__clang__) |
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.
Why doesn't it work on llvm-mingw specifically but works on mingw-w64-gcc?
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.
Most likely it's not clang but UCRT specific, but _mm_malloc
is not found with this define.
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.
Also, this is ARM specific code, so MinGW-GCC might have it missing as well.
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.
Should we use !defined(__MINGW32__)
then? It would make the comment lie though.
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.
Either way, worth PR'ing upstream to get more eyes on it and find out the proper fix there: https://github.com/DLTcollab/sse2neon
Downstream I'm fine with either option to get this to compile.
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.
I have checked headers for both MinGW/GCC and MinGW/LLVM, and it's only defined for x86 in both, so !defined(__MINGW32__)
should be more correct.
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.
MSVC define it for all architectures, and it's just a macro for the same _aligned_malloc
I have added, so it's the same.
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.
Then maybe it should just be _MSC_VER
?
Is it defined for clang-cl?
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.
No idea, but __MINGW32__
definitely should not be defined.
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.
Upstream PR - DLTcollab/sse2neon#637
Thanks! |
No description provided.