Clang is a front-end compiler for the languages C, C++ , Objective-C and Objective-C++ that uses LLVM as a backend .
It aims to be another alternative to GCC, the GNU set of compilers .
Download the latest version here, the package name should be: clang+llvm-<VERSION>-x86_64-linux-gnu-ubuntu- 18.04.tar.xz
(despite having the name ubuntu
and an old version, it works for any distro), according to the publication date of this article, the most recent version is 15.0.6
, example:
The package has several binaries, including
clang
andclang++
Extract:
Move to /opt
renaming to directory with shorter name, example: clang
Export to your $PATH
Test:
vim main.cpp
Compile:
Enjoy and count this new installation to your GNU Glibc by doing the following:
libs.conf
and enter the lib
path to it:
vim libs.conf
And paste the path below into that file:
And be happy! 😃
Mainly you who use Gentoo and NO will need to compile Clang every time there is a new version!!! It takes time pakas! 😛