LLVM/clang repository for CentOS 6

[ICO]NameLast modifiedSizeDescription

[DIR]CentOS/03-Apr-2018 08:47 -  
[   ]gpg.key30-Dec-2016 11:39 1.7K 
[TXT]readme.html09-Mar-2017 09:24 888  

Installation of repository:

Create repo file /etc/yum.repos.d/llvm.repo with content:
[llvm]
name=LLVM for CentOS-$releasever
baseurl=https://llvm.cpp.fail/CentOS/$releasever/llvm/$basearch/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://llvm.cpp.fail/gpg.key
Install everything you need:
yum install clang clang-devel libc++ libc++-devel lld lldb 
lldb-devel llvm llvm-devel
On version prior than 4.0.0 there is also package libc++abi which is now part of libc++ package.

Link-time Optimization (LTO)

Just use:
CXXFLAGS="-flto"
LDFLAGS="-fuse-ld=lld -flto"

Link-time Optimization using GOLD linker

Install GOLD linker from package binutils:
yum install binutils

Usage of clang with libc++

clang -stdlib=libc++ -std=c++14