Reference
Installing clang 3.8 on Ubuntu 14.04.3.
Ubuntu14.04 clang3.8 Installation Guide
1.add the key:
$ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
2.add the following line to /etc/apt/sources.list
:
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main
3.install clang and lldb:
$ sudo apt-get update
$ sudo apt-get install clang-3.8 lldb-3.8
4.test:
$ clang-3.8 --version
clang version 3.8.0-2ubuntu3~trusty4 (tags/RELEASE_380/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
2017.10