Skip to content

Latest commit

 

History

History
26 lines (24 loc) · 1.22 KB

File metadata and controls

26 lines (24 loc) · 1.22 KB

Clang 8 update-alternatives script

Inserts update-alternative entries for all the binaries related clang-8 and llvm and makes clang default c and c++ compiler.

Installing Clang 8

  • Add the sources (for ubuntu):
    deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-8 main
    deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-8 main
    To retrieve the archive signature:
    #: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
  • Install all key packages:
    -- LLVM
    #: apt-get install libllvm-8-ocaml-dev libllvm8 llvm-8 llvm-8-dev llvm-8-doc llvm-8-examples llvm-8-runtime
    -- Clang and co
    #: apt-get install clang-8 clang-tools-8 clang-8-doc libclang-common-8-dev libclang-8-dev libclang1-8 clang-format-8 python-clang-8
    -- libfuzzer
    #: apt-get install libfuzzer-8-dev
    -- lldb
    #: apt-get install lldb-8
    -- lld (linker)
    #: apt-get install lld-8
    -- libc++
    #: apt-get install libc++-8-dev libc++abi-8-dev

Using the script

#: sudo chmod +x clang-update-alternatives.sh
#: ./clang-update-alternatives.sh