[cfe-dev] Compiling clang on Windows/TDM-GCC 4.8.1-3 (MinGW32)

Reid Kleckner rnk at google.com
Thu Sep 11 10:51:47 PDT 2014


On Thu, Sep 11, 2014 at 10:32 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> On 11 September 2014 13:29, Eran Ifrah <eran.ifrah at gmail.com> wrote:
> > The header file is included indirectly (<winnt.h>). However, the
> definitions
> > are not visible since _WIN32_WINNT is set to a value lower than 0x0502
> > Attached is a patch to the CMakeLists.txt file that adds
> > -D_WIN32_WINNT=0x0502 in case of MinGW and WIN32 conditions are met
>
> Not sure which one is better. Aaron, any thoughts?


Given that there are approximately *two* places where we include windows.h
/ winnt.h, I think we should define the macro in the .cpp file rather than
adding a flag for every TU. It appears we don't define WINVER & co anywhere
else, so let's not change that practice.

I also don't think this needs to be MinGW specific. It's just that the Win7
/ Win8 SDKs we use don't support pre-XP OSs with the #ifndef directives
that MinGW appears to use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140911/7a0c1eb3/attachment.html>


More information about the cfe-dev mailing list