[cfe-users] Building llvm/clang with another version of clang

Dmitri Gribenko gribozavr at gmail.com
Sat Jan 5 06:16:56 PST 2013


On Sat, Jan 5, 2013 at 7:31 AM, Edward Diener
<eldlistmailingz at tropicsoft.com> wrote:
> Is it possible to build llvm/clang with a previous version of clang
> installed as a binary ? If so, how do I get llvm/configure to use the binary
> version of clang rather than gcc to build the latest version of llvm/clang ?

configure (but not CMake) will check for 'clang' in PATH and prefer to
use it instead of 'gcc' or 'cc'.  So just ensure that the previous
version of clang is in your PATH.

But please note that sometimes repositories in various distributions
include outdated versions of clang (for example, Ubuntu 12.10 still
ships clang 3.0).  I would recommend building clang with the default
system compiler in that case.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-users mailing list