Bootstrapping llvm

I read on web that llvm compiles itself with clang, but could not find the
instruction to achieve that. I try "./configure CC=clang CXX=clang" but get link
errors.
How can I do it?

Try using CXX=clang++ instead. Always use clang++ for C++ code. :slight_smile:

Dimitry Andric <dimitry <at> andric.com> writes:

> I read on web that llvm compiles itself with clang, but could not find the
> instruction to achieve that. I try "./configure CC=clang CXX=clang" but get

link

> errors.

Try using CXX=clang++ instead. Always use clang++ for C++ code. :slight_smile:

clang++ does not exist. I tried "CXX=clang -x c++" but fail with errors, clang
is trying to compile .o files.
"llvm/utils/fpcmp/Release/fpcmp.o:4:2235: warning: ull character ignored"

with
./configure --enable-optimized --with-clang=/usr/bin/clang CC=/usr/bin/clang
CXX="/usr/bin/clang -x c++"

Tried clean svn, but fails too. Did I something wrong?

As someone else already point out, you can fix this simply with the following commands:

cd /usr/bin
ln -s clang clang++

-- Jean-Daniel

if clang++ doesn't exist, you either have really ancient version of llvm (2.6)
or your installation is broken in a weird way.
You need at least llvm 2.7 installed to be able to build itself. Even better
if you use latest version from svn.