[cfe-dev] Using more than one version of clang

Edward Diener eldlistmailingz at tropicsoft.com
Mon Dec 31 20:24:54 PST 2012


On 12/31/2012 08:09 PM, Sean Silva wrote:
> On Mon, Dec 31, 2012 at 5:05 PM, Edward Diener
> <eldlistmailingz at tropicsoft.com>  wrote:
>> What are the things I must do to use both versions at different times ? In
>> particular how does a version of clang find its own header files and
>> libaries when I invoke "clang", and what do I have to do make sure that a
>> particular version of "clang" I invoke correctly finds its own header files
>> and libraries for the purposes of compiling and linking ?
>
> It finds its own headers relative to the executable that the libraries
> are compiled into, but the executable must be inside a specific
> directory structure. If you just build from source then the
> executables produced by the build (e.g. in `Release+Asserts/bin/`) are
> already in the right directory structure.

Are you saying that if I just invoke "clang", and it is found in some 
directory within the PATH, then it automatically finds its header files 
and libraries relative to where the executable exists ? That would be 
excellent.

>
> What I usually do is add the build directory's bin/ to my PATH
> whenever I want to use the freshly built one, and have my default PATH
> use the system one.

That is what I intend to do also.




More information about the cfe-dev mailing list