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

Rafael Espindola espindola at google.com
Mon Nov 9 06:14:18 PST 2009


> Personally, I'd rather a separate flag for each semantic
> interpretation. I would expect a comma separated list to simply all be
> interpreted the same way.
>
> Also, does something break if we intuit "arch" from the target
> architecture of the configuration? Combined, this might look like:

I thought about using the target arch, but I am not sure it is
correct. It should be possible to build a i686 targeting clang that
uses a i386 compiled libstdc++, no?

> ../llvm/configure --with-cxx-include-root=/foo
> --with-cxx-include-32bit-suffix=32 --with-cxx-include-64bit-suffix=64
>
> Verbose, but clear to me. A '--with-cxx-include-arch-suffix' could
> work as well, but it does muddy the waters some as to which suffix is
> applied first.

This works nicely if clang is to search a single libstdc++ install
dir. I think this is the most common pattern, but maybe someone wants
to build a clang binary that works on two different versions of OS X
for example. With the current patch the syntax would be:

../llvm/configure
--with-cxx-include-dir=/usr/include/c++/4.2.1,i686-apple-darwin10,,x86_64:/usr/include/c++/4.0.0/,i686-apple-darwin8,,

> -Chandler

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the cfe-dev mailing list