-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
[OpenMP] fix endianness dependent definitions in OMP headers for MSVC #84540
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
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.
LGTM, thanks for fixing the issue!
There are also 3 LIT test cases checking the same condition. It will be great if you could fix them while you are on it. Thanks!
openmp/runtime/test> grep -r __BYTE_ORDER__ *
tasking/bug_nested_proxy_task.c:#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
tasking/bug_proxy_task_dep_waiting.c:#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
tasking/hidden_helper_task/common.h:#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
added the test fixes |
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.
Confirm LGTM, thanks very much, @vadikp-intel!
…llvm#84540) MSVC does not define __BYTE_ORDER__ making the check for BigEndian erroneously evaluate to true and breaking the struct definitions in MSVC compiled builds correspondingly. The fix adds an additional check for whether __BYTE_ORDER__ is defined by the compiler to fix these. --------- Co-authored-by: Vadim Paretsky <b-vadipa@microsoft.com> (cherry picked from commit 110141b)
…llvm#84540) MSVC does not define __BYTE_ORDER__ making the check for BigEndian erroneously evaluate to true and breaking the struct definitions in MSVC compiled builds correspondingly. The fix adds an additional check for whether __BYTE_ORDER__ is defined by the compiler to fix these. --------- Co-authored-by: Vadim Paretsky <b-vadipa@microsoft.com> (cherry picked from commit 110141b)
MSVC does not define BYTE_ORDER making the check for BigEndian erroneously evaluate to true and breaking the struct definitions in MSVC compiled builds correspondingly. The fix adds an additional check for whether BYTE_ORDER is defined by the compiler to fix these.