-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_clang.sh
More file actions
executable file
·23 lines (20 loc) · 1.01 KB
/
install_clang.sh
File metadata and controls
executable file
·23 lines (20 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
################################################################################
# Install clang 6 in ubuntu 16.04
# https://blog.kowalczyk.info/article/k/how-to-install-latest-clang-6.0-on-ubuntu-16.04-xenial-wsl.html
################################################################################
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main"
sudo apt-get update
sudo apt-get install -y clang-6.0
# Reconfigure the system so that clang refers to clang6
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-6.0 1000
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-6.0 1000
# Set clang as default compiler.
# For fish shell user, add following to your config.fish.
# set -gx CC /usr/bin/clang
# set -gx CXX /usr/bin/clang++
#
# For bash shell user, add following to your /etc/bash.bashrc.
# export CC=/usr/bin/clang
# export CXX=/usr/bin/clang++