[cfe-dev] MinGW header search paths (InitHeaderSearch.cpp)

Ruben Van Boxem vanboxem.ruben at gmail.com
Sat Apr 23 00:59:01 PDT 2011


Op 23 apr. 2011 00:44 schreef "Douglas Gregor" <dgregor at apple.com> het
volgende:
>
>
> On Apr 22, 2011, at 3:43 PM, Tom Prince wrote:
>
> > On 2011-04-22, Ruben Van Boxem wrote:
> >> 2011/4/22 Douglas Gregor <dgregor at apple.com>
> >>
> >>>
> >>> On Apr 22, 2011, at 12:25 PM, Reid Kleckner wrote:
> >>>
> >>>> I didn't interpret his suggestion that way, I thought it was more
> >>>> along the lines of doing what the 'which gcc' command does.
> >>>
> >>> Ah, my mistake. We could try that for mingw at least. In general, it
> >>> doesn't work as well as actually invoking GCC, since every build of
GCC
> >>> seems to like to put its standard library in a different place.
> >>>
> >>>
> >> That was indeed my plan. We can perhaps read the
> >> <gcclocation>/../include/c++/ subfolders with random/all
versions/targets
> >> and add them to the search directories. Once libcxx works with mingw
and on
> >> windows in general, we can get rid of this foolishness and just add the
> >> <clang(++)location>/../include(/c++) and be done with it (for Windows
at
> >> least).
> >
> >
> > On gentoo x86_64, the libstc++ headers are in
> > <gcclocation>/../lib64/<triple>/<gcc-version>/include/g++-v4
> > and
> > <gcclocation>/../lib64/<triple>/<gcc-version>/include/g++-v4/<triple>
> > so things aren't so simple.
>
> Right. This is actually an extremely hard problem to solve well. Ideally,
we'd have ./configure map out the libraries that could be used, and pick a
default one that works for the system.

This is a perfectly good way on Linux, where every distro keeps its own
packages. But there is no way one can distribute a standalone clang on
Windows (and allow the user to use his MinGW installation). I'm trying to
get a way to download a LLVM/clang binary package for use with "your" MinGW.
Linux generally does not have this diversity; mostly, people use system GCC,
on Windows, it might come with your IDE, from mingw.org, from TDM-GCC, some
Russian site, etc. And they're all equally valid.

Ruben

>
>        - Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110423/0b7c6b3e/attachment.html>


More information about the cfe-dev mailing list