[cfe-dev] [patch] Add configure option for C include search path

Daniel Dunbar daniel at zuster.org
Wed Nov 11 10:51:06 PST 2009


On Wed, Nov 11, 2009 at 10:48 AM, Rafael Espindola <espindola at google.com> wrote:
>> Does this make sense?
>
> It does, but it looks a bit orthogonal to my patch. It should still be
> possible to build clang as a non-system compiler. For example, it
> should be possible to configure it so that
>
> * C headers are looked in /foo/bar and /bar/zed
> * The libstdc++ header is looked for at /zed or in a binary relative path
> * No other path is searched
>
> This is a normal way of using gcc when it is not the system compiler.
> It is also convenient when you want to try an all new toolchain and
> not be "infected" by your system headers.
>
> So, the reason I think you proposal is orthogonal is that once it is
> implemented we would still have a configure option like

I completely agree. All I meant was that we shouldn't try to solve the
general problem in this fashion. This is certainly a useful option,
and once the -target world comes about it will just construct a custom
configuration behind the scenes.

 - Daniel

> ../llvm/configure --with-c-includes=/foo:/bar
>
> The difference would be that this would just define a new "target".
> Lets call it "configure". So a clang built in this way would be used
> as
>
> clang -c foo.c (searches /foo and /bar)
> clang -target configure -c foo.c (the same, target configure is the default)
> clang -target darwin9 -c foo.c (searches the darwin9 include directories)
>
>>  - Daniel
>
> Cheers,
> --
> Rafael Ávila de Espíndola
>




More information about the cfe-dev mailing list