1.system info
CentOS Linux release 7.5.1804 X86_64linux
2.disable selinux and firewalldc++
4.llvm install
1).cmake
-# wget https://cmake.org/files/v3.11/cmake-3.11.4.tar.gz
-# tar zxvf cmake-3.11.4.tar.gz
-# ./configure
-# make
-# make installsql
2).llvm
-# wget http://releases.llvm.org/7.0.0/llvm-7.0.0.src.tar.xz
-# tar -xJf llvm-7.0.0.src.tar.xz
-# mv llvm-7.0.0.src llvmide
3).Clang
-# wget http://releases.llvm.org/7.0.0/cfe-7.0.0.src.tar.xz
-# tar -xJf cfe-7.0.0.src.tar.xz
-# mv cfe-7.0.0.src llvm/tools/clang
-# mkdir build
-# cd build/
-# cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" ../llvm
-# make -j 8
-# make installpost
編譯提示:
-DLLVM_TARGETS_TO_BUILD="X86",僅編譯X86平臺,若是64位操做系統,
默認爲 x86_64-unknown-linux-gnu;不然,編譯全部平臺庫,
此選項產生編譯文件較大可能幾十GB。ui
------ check install 操作系統
-# clang --version
clang version 7.0.0 (tags/RELEASE_700/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
-# postgresql
-# llvm-config --version
7.0.0
-# ip
編譯選項:
--with-llvm,jit supportget