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

Rafael Espindola espindola at google.com
Sun Nov 8 09:16:25 PST 2009


2009/11/4 Rafael Espindola <espindola at google.com>:
> The attached patches adds support defining the C search paths with configure:
>
> ../src/configure --with-include-dirs=foo:bar:zed
>
> Will create a clang binary that searches for C headers in foo, bar and
> zed. If the
> option is not given, the current runtime search is done.

Attached are updated versions of the patches. I have also included
patches for c++. With it it is possible to run configure as

../llvm/configure --with-cxx-include-dir=/foo,bar,32,64

To get the directories /foo, /foo/backward and /foo/bar/(32|64)
searched depending on -m32 or -m64. In cases where there are no
multilib dirs (darwin8 for example), the option looks like
--with-cxx-include-dir=/usr/include/c++/4.0.0/,i686-apple-darwin8,,

The llvm patch also includes a new utility function:
llvm::SplitStringWithEmpty. It is similar to SplitString, but empty
elements are not removed. I find its semantics more intuitive. That is
what python implements in string.split() :-). Maybe I should just
change SplitString and update its users?

Cheers,
-- 
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-c-include.patch
Type: text/x-diff
Size: 1038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091108/21f8ee4b/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-c-include.patch
Type: text/x-diff
Size: 1131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091108/21f8ee4b/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-cxx-include.patch
Type: text/x-diff
Size: 2982 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091108/21f8ee4b/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-cxx-include.patch
Type: text/x-diff
Size: 9232 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20091108/21f8ee4b/attachment-0003.patch>


More information about the cfe-dev mailing list