Installing LLVM
Procedure
- Use PuTTY to log in to the server as the root user.
- Download LLVM.
wget http://releases.llvm.org/8.0.0/llvm-8.0.0.src.tar.xz
- Decompress LLVM.
tar xvf llvm-8.0.0.src.tar.xz
- Go to the directory generated after the decompression.
cd llvm-8.0.0.src/
- Go to the llvm-8.0.0.src/tools directory and obtain the Clang source code.
cd tools/ wget http://releases.llvm.org/8.0.0/cfe-8.0.0.src.tar.xz
- Decompress cfe-8.0.0.src.tar.xz and rename the directory.
tar vxf cfe-8.0.0.src.tar.xz mv cfe-8.0.0.src clang
- Go to the llvm-8.0.0.src/tools directory and obtain the compiler-rt source code.
cd ../projects/ wget http://releases.llvm.org/8.0.0/compiler-rt-8.0.0.src.tar.xz
- Decompress compiler-rt-8.0.0.src.tar.xz and rename the directory.
tar vxf compiler-rt-8.0.0.src.tar.xz mv compiler-rt-8.0.0.src compiler-rt
- Return to the llvm-8.0.0.src directory and create a build directory.
cd .. mkdir build
- Go to the build directory.
cd build/
- Perform the compilation and installation.
cmake -G "Unix Makefiles" -Wno-dev -DCMAKE_BUILD_TYPE=Release ../ make -j32 make install
Parent topic: Configuring the Compilation Environment