[cfe-dev] Version agnostic path search for mingw

Ruben Van Boxem vanboxem.ruben at gmail.com
Sun Mar 18 03:49:21 PDT 2012


2012/3/18 Nikola Smiljanic <popizdeh at gmail.com>

> Here's something we talked about on IRC, it should have two effects:
>
> 1. regex is used to match directories of the form x.x.x, this should
> be the only change for mingw-w64
>

This seems functional on my end. Good stuff. No more manually adding search
paths for new versions of GCC :)

I would also suggest adding a relative search path for plain MinGW.org, so
that they reap the benefits for this as well. But that is up to you.


> 2. clang doesn't add all the necessary paths when it comes to
> mingw.org, it only includes c:/mingw/include (hello world will fail to
> compile due to missing stddef.h). I added
> c:\MinGW\lib\gcc\mingw32\x.x.x\include and
> c:\MinGW\lib\gcc\mingw32\x.x.x\include-fixed directories. The order in
> which they are added is the same one that mingw.org uses (got this
> from gcc -xc -E -v -), this is why the call to
> AddPath("c:/mingw/include") is inside the loop even though it doesn't
> depend on any loop variable.
>
> I have no idea how this plays with MSYS and Cygwin, but it shouldn't
> change the logic, I'm only adding more paths. The code doesn't follow
> the 80 column width convention, this is something I'll change before
> submitting the patch to cfe-commits, it's just easier to read this
> way.
>

Thanks for doing this!

Ruben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120318/34ceea2d/attachment.html>


More information about the cfe-dev mailing list