Linux
-
Extract the
tar.xz
format file into the final destination. In this guide the~\community\clang
path is used. Also suggested to rename the long folder name to indicate only the version, in this casev19.1.6
.-
Use the following command to extract the downloaded file where the
tar.xz
file is located.tar xf LLVM-19.1.6-Linux-X64.tar.xz -C ~/community/clang/
-
Use the following command to rename the directory at location
~/community/clang
mv LLVM-19.1.6-Linux-X64/ v19.1.6/
-
-
Add directory which included the clang-tidy to the
$PATH
environment variable.This step is needed in order to be able to use only the
clang-tidy
command. Without this the full path of the tool shall be used, like~/community/clang/v19.1.6/bin/clang-tidy
.Use the following command to append the necessary path to the
$PATH
environment variable.export PATH=~/community/clang/v19.1.6/bin/:$PATH
-
Check the installation by using the command below.
clang-tidy --version
The following message should be displayed.
LLVM (http://llvm.org/): LLVM version 19.1.6 Optimized build.