opensuse下安装llvm-clang3.3

从下面的地址下载文件:

http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz

http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz

http://llvm.org/releases/3.3/clang-tools-extra-3.3.src.tar.gz

http://llvm.org/releases/3.3/compiler-rt-3.3.src.tar.gz

http://llvm.org/releases/3.3/libcxx-3.3.src.tar.gz


解压这几个文件,获得:

llvm-3.3.src

cfe-3.3.src

clang-tools-extra-3.3.src

compiler-rt-3.3.src

libcxx-3.3.src

然后在解压内执行

mv cfe-3.3.src clang
mv clang/ llvm-3.3.src/tools/

mv clang-tools-extra-3.3.src extra
mv extra/ llvm-3.3.src/tools/clang/

mv compiler-rt-3.3.src compiler-rt
mv compiler-rt llvm-3.3.src/projects/


然后在建一个目录:

mkdir build-3.3
cd build-3.3

然后编译即可:

../llvm-3.3.src/configure --enable-optimized --enable-targets=host-only

make

sudo make install


完成后用clang++ -v 查看版本即可




你可能感兴趣的:(opensuse下安装llvm-clang3.3)