[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32
Mateusz MikuĊa via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 3 05:57:18 PST 2017
mati865 added a comment.
Adding
// c:\mingw32\lib\gcc\i686-w64-mingw32\4.9.1\include
// c:\mingw32\lib\gcc\i686-w64-mingw32\4.9.1\include-fixed
for Clang is wrong on Windows because including limits.h will not show an error and won't really include mingw-w64 limits.h
Output of code from my earlier comment without patch:
error: use of undeclared identifier 'PATH_MAX'
int main() { char buf[PATH_MAX]; }
I haven't used cross compiled Clang on Linux so I added #ifndef LLVM_ON_WIN32 guard for this code.
With this guard Clang on Windows uses include paths like native Clang on Linux
Include directories on public paste: https://reviews.llvm.org/P7968
https://reviews.llvm.org/D29464
More information about the cfe-commits
mailing list