1.升级cmake
yum autoremove cmake
wget https://cmake.org/files/v3.7/cmake-3.7.1.tar.gz
tar xzf cmake-3.7.1.tar.gz
cd cmake-3.7.1
./bootstrap
gmake -j$(nproc)
make install
cd ..
rm -fr cmake*
2.安装pip
sudo yum -y install epel-release
sudo yum -y install python-pip
sudo yum clean all
pip install distribute
3.安装依赖库
wget http://llvm.org/releases/3.9.1/llvm-3.9.1.src.tar.xz
wget http://llvm.org/releases/3.9.1/cfe-3.9.1.src.tar.xz
wget http://llvm.org/releases/3.9.1/compiler-rt-3.9.1.src.tar.xz
wget http://llvm.org/releases/3.9.1/clang-tools-extra-3.9.1.src.tar.xz
tar xf llvm-3.9.1.src.tar.xz
mv llvm-3.9.1.src llvm
cd llvm/tools
tar xf ../../cfe-3.9.1.src.tar.xz
mv cfe-3.9.1.src clang
cd clang/tools
tar xf ../../../../clang-tools-extra-3.9.1.src.tar.xz
mv clang-tools-extra-3.9.1.src extra
cd ../../../projects
tar xf ../../compiler-rt-3.9.1.src.tar.xz
mv compiler-rt-3.9.1.src compiler-rt
cd ../..
mkdir llvm-build
cd llvm-build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/data/software/clang3.9.1 -DLLVM_OPTIMIZED_TABLEGEN=1 ../llvm
make -j$(nproc)
make install
end
posted on 2017-10-12 15:19
长戟十三千 阅读(3068)
评论(0) 编辑 收藏 引用 所属分类:
编程技巧随笔