| Reading time: | 20 min |
| Last updated: | 11 May 2026 |
| Reading time: |
| 20 min |
| Last updated: |
| 11 May 2026 |
| Author: | Jonathan Davies, Arm |
| Official docs: | View |
| Tags: |
| Author: |
|
| Official docs: |
| View |
| Tags: |
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.
BOLT is an open-source post-link binary optimization tool developed to speed up large applications. It does this by optimizing the application’s code layout based on performance profile samples collected during execution.
In this guide, you’ll learn how to download and install BOLT. The instructions are for Debian-based Linux distributions, but can be adapted for other Linux distributions.
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 .
Follow these steps:
Install Git for your operating system.
Many Linux distributions include Git so you may not need to install it.
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.
sudo apt install ninja-build -y
Check it is installed:
ninja --version
The output is similar to:
1.11.1
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
sudo apt-get install xz-utils -y
You can install BOLT by building the source code or by downloading a binary release from GitHub.
To build and install BOLT from source code, follow these steps:
git clone https://github.com/llvm/llvm-project.git
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.
.bashrc file
echo 'export PATH="$PATH:$HOME/llvm-project/build/bin"' >> ~/.bashrc
source ~/.bashrc
You are now ready to verify BOLT is installed .
To install BOLT using a binary release, follow these steps:
The following commands use BOLT version 22.1.3. The same commands work with other versions. Replace the file used in these steps with the file for your version of choice. To find the latest version, see LLVM Project releases .
For Arm Linux, use the file with ARM64 in the name:
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-22.1.3/LLVM-22.1.3-Linux-ARM64.tar.xz
tar -xvf LLVM-22.1.3-Linux-ARM64.tar.xz
.bashrc file
echo 'export PATH="$PATH:$HOME/LLVM-22.1.3-Linux-ARM64/bin"' >> ~/.bashrc
source ~/.bashrc
To verify BOLT is installed, follow these steps:
perf2bolt and llvm-bolt are installedCheck the perf2bolt command:
perf2bolt
The output is similar to:
perf2bolt: Not enough positional command line arguments specified!
Must specify at least 1 positional argument: See: perf2bolt --help
Check the llvm-bolt command:
llvm-bolt
The output is similar to:
llvm-bolt: Not enough positional command line arguments specified!
Must specify at least 1 positional argument: See: llvm-bolt --help
llvm-bolt --version
The output is similar to:
LLVM (http://llvm.org/):
LLVM version 22.1.3
Optimized build.
BOLT revision e9846648fd6183ee6d8cbdb4502213fcf902a211
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_32 - AArch64 (little endian ILP32)
aarch64_be - AArch64 (big endian)
arm64 - ARM64 (little endian)
arm64_32 - ARM64 (little endian ILP32)
riscv32 - 32-bit RISC-V
riscv32be - 32-bit big endian RISC-V
riscv64 - 64-bit RISC-V
riscv64be - 64-bit big endian RISC-V
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
You’ll see additional Registered Targets if you downloaded a binary release.
You are now ready to use BOLT on your Linux machine.
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.