Skip to content

Instantly share code, notes, and snippets.

View PLeVasseur's full-sized avatar

Pete LeVasseur PLeVasseur

View GitHub Profile
clang-12 -xc -E -H -include stddef.h - </dev/null 2>&1 | head -n 20
@PLeVasseur
PLeVasseur / gist:48a08c76e59cf79d3a75dfc80f51e959
Created September 30, 2025 09:51
clang-12 on Ubuntu 24.04 x86_64
set -euxo pipefail
mkdir -p ~/tmp/clang12 && cd ~/tmp/clang12
# Core toolchain + dev headers/libs (amd64 builds from focal)
base=https://archive.ubuntu.com/ubuntu/pool/universe/l/llvm-toolchain-12
wget -q ${base}/clang-12_12.0.1-19ubuntu3_amd64.deb
@PLeVasseur
PLeVasseur / gist:d8aa321661975e9e59e92fd1672c4273
Last active September 30, 2025 13:57
clang-12 on Ubuntu 24.04 - attempt 3
mkdir -p ~/tmp/clang12 && cd ~/tmp/clang12
# Download focal’s 12.0.1 packages (adjust URLs for your mirror/arch)
wget https://archive.ubuntu.com/ubuntu/pool/universe/l/llvm-toolchain-12/clang-12_12.0.1-19ubuntu3_amd64.deb
wget https://archive.ubuntu.com/ubuntu/pool/universe/l/llvm-toolchain-12/libclang-12-dev_12.0.1-19ubuntu3_amd64.deb
wget https://archive.ubuntu.com/ubuntu/pool/universe/l/llvm-toolchain-12/libclang1-12_12.0.1-19ubuntu3_amd64.deb
@PLeVasseur
PLeVasseur / gist:1f43ba364e0fdafe3cfee17d7de316b8
Created September 30, 2025 07:00
clang-12 on Ubuntu 24.04 - attempt 2
set -euo pipefail
VER=12.0.1
ARCH=$(uname -m)
case "$ARCH" in
x86_64) PKG="clang+llvm-${VER}-x86_64-linux-gnu-ubuntu-20.04" ;;
@PLeVasseur
PLeVasseur / gist:71cd04aecff789eeda51e7a4a004bb06
Created September 30, 2025 06:48
Install clang-12 on Ubuntu 24.04
# choose x86_64 or aarch64 as appropriate
VER=12.0.1
PKG=clang+llvm-${VER}-x86_64-linux-gnu-ubuntu-20.04
cd /tmp
curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${VER}/${PKG}.tar.xz