You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Clang][Cygwin] Remove erroneous _WIN32 define and clean up Cygwin code (llvm#138120)
With this define present and building with Clang the build fails:
```
In file included from /h/projects/llvm-project/clang/tools/libclang/CIndexer.cpp:36:
In file included from /usr/include/w32api/windows.h:69:
In file included from /usr/include/w32api/windef.h:9:
In file included from /usr/include/w32api/minwindef.h:163:
In file included from /usr/include/w32api/winnt.h:1658:
In file included from /usr/lib/clang/20/include/x86intrin.h:15:
In file included from /usr/lib/clang/20/include/immintrin.h:24:
In file included from /usr/lib/clang/20/include/xmmintrin.h:31:
/usr/lib/clang/20/include/mm_malloc.h:45:22: error: use of undeclared identifier '_aligned_malloc'; did you mean 'aligned_alloc'?
45 | __mallocedMemory = _aligned_malloc(__size, __align);
| ^
```
Removing it allows the build with Clang to succeed and doesn't break
build with GCC.
The "#define _WIN32" was originally "#define LLVM_ON_WIN32", but this
was changed into a plain "#define _WIN32" (which not necessarily is
something that is supported to do) in
1865df4 as part of a larger
refactoring.
This cygwin specific code isn't needed for converting paths anymore, as
dladdr takes care of it. (dladdr was added to cygwin in 2017, according
to the tags in version 2.8.0.)
Co-authored-by: Jeremy Drake <[email protected]>
0 commit comments