Rate This Document
Findability
Accuracy
Completeness
Readability

Installing LLVM

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Download LLVM.
    wget http://releases.llvm.org/8.0.0/llvm-8.0.0.src.tar.xz
  3. Decompress LLVM.
    tar xvf llvm-8.0.0.src.tar.xz
  4. Go to the directory generated after the decompression.
    cd llvm-8.0.0.src/
  5. 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
  6. 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
  7. 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
  8. 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
  9. Return to the llvm-8.0.0.src directory and create a build directory.
    cd ..
    mkdir build
  10. Go to the build directory.
    cd build/
  11. Perform the compilation and installation.
    cmake -G "Unix Makefiles" -Wno-dev -DCMAKE_BUILD_TYPE=Release ../
    make -j32
    make install