This repository was archived by the owner on Jan 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Clang format
Simon Lynen edited this page Aug 7, 2014
·
1 revision
Copied from: here Install the llvm toolchain repository, for Ubuntu 12.04, in your software sources
sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'
sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main'
sudo add-apt-repository 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main'
Install the gpg key of that repository to authenticate package downloads from it. Note the final hyphen on this commandline:
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
Refresh your package database again:
sudo apt-get update
sudo apt-get install clang-3.4 clang-3.4-doc libclang-common-3.4-dev libclang-3.4-dev libclang1-3.4 libclang1-3.4-dbg libllvm-3.4-ocaml-dev libllvm3.4 libllvm3.4-dbg lldb-3.4 llvm-3.4 llvm-3.4-dev llvm-3.4-doc llvm-3.4-examples llvm-3.4-runtime cpp11-migrate-3.4 clang-format-3.4
sudo apt-get install clang-3.4 clang-3.4-doc libclang-common-3.4-dev libclang-3.4-dev libclang1-3.4 libclang1-3.4-dbg libllvm-3.4-ocaml-dev libllvm3.4 libllvm3.4-dbg lldb-3.4 llvm-3.4 llvm-3.4-dev llvm-3.4-doc llvm-3.4-examples llvm-3.4-runtime cpp11-migrate-3.4 clang-format-3.4
Prove that you have got clang 3.4:
clang -v