LLVM toolchain for Linux on Arm
About this Install Guide
| Reading time: | 10 min |
| Last updated: | 23 Jul 2026 |
| Reading time: |
| 10 min |
| Last updated: |
| 23 Jul 2026 |
| Author: | Paschalis Mpeis, Jonathan Davies |
| Official docs: | View |
| Author: |
|
| Official docs: |
| View |
This guide shows you how to install and use the tool with the most common configuration. For advanced options and complete reference information, see the official documentation. Some install guides also include optional next steps to help you explore related workflows or integrations.
The LLVM toolchain includes Clang, LLD, BOLT, and other utilities for compiling, linking, profiling, and optimizing applications on Arm Linux.
In this guide, you’ll learn how to install LLVM from a prebuilt release or from source, install BOLT from Linux distribution packages, and verify the installed tools.
BOLT is provided as a built-in, ready-to-use component of the Arm Toolchain for Linux suite. For more information, see How to use BOLT with our toolchain .
Before you begin
Confirm you are using an Arm machine by running:
Run:
uname -m
The output is similar to:
aarch64
If you see a different result, you are not using an Arm computer running 64-bit Linux.
There are three ways to install the LLVM tools covered in this guide:
- Install LLVM from a prebuilt release to install Clang, LLD, BOLT, and the LLVM profiling tools.
- Build LLVM from source if you need to build the LLVM toolchain yourself.
- Install BOLT using a package manager if you only need the BOLT tools and your Linux distribution provides a suitable version.
Install from LLVM Releases
You can install LLVM by downloading a prebuilt binary release from GitHub.
Install the tools needed to download and extract the archive.
For Debian-based Linux distributions, including Ubuntu, install wget and xz-utils:
sudo apt update
sudo apt install wget xz-utils -y
The following commands use LLVM version 22.1.8. To install a different version, replace the filename in the commands below. For the latest releases, see LLVM Project releases .
The commands extract LLVM to $HOME/toolchain. To install LLVM in a different location, adjust the extraction path and update the PATH environment variable accordingly.
- Download a binary release
For Arm Linux, use the archive with Linux-ARM64 in its filename:
mkdir -p $HOME/toolchain
cd $HOME/toolchain
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.8/LLVM-22.1.8-Linux-ARM64.tar.xz
- Extract the downloaded file
tar -xvf LLVM-22.1.8-Linux-ARM64.tar.xz
- Add the LLVM
bindirectory to yourPATH
This enables you to run LLVM tools such as clang and lld from any directory.
The command updates PATH for your current terminal session.
To make the change persistent, add the same command to your shell profile, such as ~/.bashrc.
export PATH="$HOME/toolchain/LLVM-22.1.8-Linux-ARM64/bin:$PATH"
Install from Sources
Install source build dependencies
Before building LLVM from source, install the required build tools.
- Install Git
Install Git for your operating system.
Many Linux distributions include Git so you may not need to install it.
- Install CMake
sudo apt install cmake -y
Check it is installed:
cmake --version
The output is similar to:
cmake version 3.28.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
For more information, see CMake install guide.
- Install Ninja
sudo apt install ninja-build -y
Check it is installed:
ninja --version
The output is similar to:
1.11.1
- Install Clang
sudo apt install clang -y
Check it is installed:
clang --version
The output is similar to:
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Build BOLT from source
To build and install BOLT from source code, follow these steps:
- Clone the repository
git clone https://github.com/llvm/llvm-project.git
- Build BOLT and run it
cd llvm-project
mkdir build
cd build
cmake -G Ninja ../llvm -DLLVM_TARGETS_TO_BUILD="X86;AArch64" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_PROJECTS="bolt;clang;lld"
ninja bolt
The build time depends on your machine configuration and may take several minutes to complete.
- Add the path to BOLT in your
.bashrcfile
echo 'export PATH="$PATH:$HOME/llvm-project/build/bin"' >> ~/.bashrc
source ~/.bashrc
After the build completes, continue to verify the BOLT tools .
Install BOLT using a package manager
Use a package manager if you prefer a system-managed installation. Package versions depend on your Linux distribution.
sudo apt update
sudo apt install llvm-bolt
sudo dnf install llvm-bolt
sudo zypper install llvm-bolt
BOLT is available on Ubuntu 25.04 and later, Debian 13 and later, Fedora 42 and later, and on openSUSE Tumbleweed
Verify Clang compiler and LLD linker tools
Run the following commands:
clang --version
clang++ --version
ld.lld --version
The output is similar to:
clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/ubuntu/toolchain/LLVM-22.1.8-Linux-ARM64/bin
clang version 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/ubuntu/toolchain/LLVM-22.1.8-Linux-ARM64/bin
LLD 22.1.8 (https://github.com/llvm/llvm-project ca7933e47d3a3451d81e72ac174dcb5aa28b59d1) (compatible with GNU linkers)
Each command should print LLVM version information.
Compile and run a C++ example
Use a text editor to copy and paste the following code into a file named hello.cpp:
#include <iostream>
int main()
{
std::cout << "Hello, LLVM on Arm\n";
return 0;
}
Compile the example with clang++ and link it with LLD:
clang++ -fuse-ld=lld hello.cpp -o hello
Run the example:
./hello
The output is:
Hello, LLVM on Arm
You are now ready to use LLVM on your Arm Linux system.
Verify the PGO profiling tools
Run the following commands:
llvm-profdata --version
llvm-profgen --version
Each command should print LLVM version information.
Verify BOLT tools
Run the following commands:
perf2bolt --version
llvm-bolt --version
The output is similar to:
LLVM (http://llvm.org/):
LLVM version 22.1.8
Optimized build.
Each command should print LLVM version information.
Give Feedback
How would you rate this tool quick-install guide?
What is the primary reason for your feedback ?
Thank you! We're grateful for your feedback.
- Have more feedback? Log an issue on GitHub.
- Want to collaborate? Join our Discord server.