[cfe-dev] Clang on Windows targeting gcc requirements

Edward Diener eldlistmailingz at tropicsoft.com
Fri Jul 3 15:07:57 PDT 2015


On 7/3/2015 11:04 AM, Reid Kleckner wrote:
> On Fri, Jul 3, 2015 at 6:13 AM, Edward Diener
> <eldlistmailingz at tropicsoft.com
> <mailto:eldlistmailingz at tropicsoft.com>> wrote:
>
>     On 6/25/2015 2:13 PM, Yaron Keren wrote:
>
>         See http://reviews.llvm.org/D5268
>         <https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D5268&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=AItHo8p__ZKRtsr_Y2YzWR9lqli3wPXsIyPkX1v00lw&s=uu-7dwhBJyybUlP5mtGvCiSyiL3ryxdpMxAF6OMDLJw&e=>
>         <https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D5268&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=YgSrUuiAhPt76cF_h_LXb8Mg84W8p9nMvUiL3koHKP4&s=aW_6t6KDGfo5hO6NiTn5Hy9afNhzwfkX-BZHT9PtXmk&e=>
>
>
>     I can see that the patch has been applied officially to the latest
>     clang source. It's in the latest code when I update llvm/clang.
>     Thanks very much !
>
>     But how do I use it ?
>
>     Am I supposed to be able to build clang using a mingw-64 distro in
>     my PATH ?
>
>     When I compile with clang how do I tell it to use the mingw-64
>     headers and RTL ? Does it matter whether the mingw-64 distro is 32
>     bit or 64 bit ?
>
>     Do I need to have the mingw-64 distro at c:\mingw ?
>
>     I am willing to test this for clang and report back results here,
>     since I can easily switch between mingw-64 distros ( 4.8.4, 4.9.2,
>     5.1 ) and I test a number of Boost libraries including my own with
>     clang, but I need a little information on how to do it.
>
>
> It works by looking for 'gcc' on PATH and then assuming that it is in
> the bin directory of a mingw installation. It will back out of that
> directory and look relative to it for headers and libraries. Will that work?

Excellent ! I will try it out and report back any problems I may find. 
Hopefully there will be none and clang/mingw-64/gcc on Windows will be a 
reality. That will make using clang on Windows targeting gcc much better 
as mingw-64 distros are better than mingw distros in many ways, 
especially in Windows API support. Although my own Boost libraries are 
not involved in Windows API a number of Boost libraries are so testing 
them with clang should be easier when mingw-64 is used.






More information about the cfe-dev mailing list