Fix build issue when using clang (#2137)#2140
Fix build issue when using clang (#2137)#2140doug-walker merged 3 commits intoAcademySoftwareFoundation:mainfrom
Conversation
Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org>
5ca4fe8 to
aa12e2b
Compare
|
Thanks, but I'm not 100% sure this covers #2137 - we're not using |
|
@kmilos I've just tried it with this line instead, which uses the GNU command line: And it still appears to work. Are you able to test to see if it fixes your issue? |
|
Sorry, that'll have to be @lazka confirming, I have no access... But generally, I think you'll find that regardless of the frontend command (and architecture), the "official" LLVM Windows binary packages I assume you're using, and the MSYS2 CLANGARM64 (and CLANG64 equally) have different targets defined and are not, in fact, identical/equivalent toolchains: In other words, both |
|
ACK, I'm not able to use that triplet without an msys2 env, so I'll await the response from lazka. I can't see any other way it would have |
I can't easily test right now, but this looks functionally equivalent to the patch I was using, so lgtm! |
Oops, didn't see that link at first, apologies! (So, not defined by the compiler, as expected, but by MinGW headers.) I'd still prefer to make it explicit like it is in other places then: |
|
However, we do also have GCC 15 around the corner finally supporting the Maybe use |
|
@kmilos I can't easily test the new version of GCC, but I think an inversion may well work here (assuming it does |
|
Thanks @anthony-linaro I think you can actually ignore my GCC comment and leave it as |
|
Given that, looking at the code, it's already entirely in an |
Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org>
|
LGTM |
…ademySoftwareFoundation#2140) * Fix build issue when using clang (AcademySoftwareFoundation#2137) Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org> * Change define check, and update comment Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org> --------- Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org> Co-authored-by: Doug Walker <doug.walker@autodesk.com>
…ademySoftwareFoundation#2140) * Fix build issue when using clang (AcademySoftwareFoundation#2137) Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org> * Change define check, and update comment Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org> --------- Signed-off-by: Anthony Roberts <anthony.roberts@linaro.org> Co-authored-by: Doug Walker <doug.walker@autodesk.com> Signed-off-by: Michael Horsch <michael.horsch@autodesk.com>
Fixes the issue described in #2137 by defining the correct type when using clang-cl (which masquerades as MSVC).
Tested using LLVM 20.1.0's
clang-cl, with the following command line: