Linux
-
Extract the
tar.xzformat file into the final destination. In this guide the~\community\clangpath 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.xzfile 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/clangmv LLVM-19.1.6-Linux-X64/ v19.1.6/
-
-
Add directory which included the clang-tidy to the
$PATHenvironment variable.This step is needed in order to be able to use only the
clang-tidycommand. 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
$PATHenvironment variable.export PATH=~/community/clang/v19.1.6/bin/:$PATH -
Check the installation by using the command below.
clang-tidy --versionThe following message should be displayed.
LLVM (http://llvm.org/): LLVM version 19.1.6 Optimized build.