Last active
March 19, 2026 05:35
-
-
Save neodix42/24d6a401e928f7e895fcc8e7b7c5c24a to your computer and use it in GitHub Desktop.
Install clang-21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # TON is moving to clang-21 for very pragmatic reasons — not because it's fashionable, | |
| # but because it materially improves what we ship. | |
| # We use clang-21 because we want the best C++ the language currently offers, | |
| # stronger safety guarantees, better diagnostics, better generated code, and a toolchain that won't rot under us. | |
| # Important! Remember, at this time no TON fullnodes or validators should be running on Ubuntu 20.04. | |
| # This guide shows how to install clang-21 on Ubuntu 22.04 and 24.04 only. | |
| # Ubuntu 22.04 | |
| sudo apt install lsb-release wget software-properties-common gnupg | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 21 clang | |
| # Ubuntu 24.04 | |
| wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
| echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list | |
| sudo apt -y update | |
| sudo apt install -y clang-21 | |
| # optionally, change default clang | |
| sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 200 | |
| sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 200 | |
| # update TON validator using MyTonCtrl | |
| echo update master | mytonctrl | |
| echo upgrade master | mytonctrl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On top