LLVM 框架提供多种下载方式:
- LLVM Download Page (官方网站): https://releases.llvm.org/
- LLVM GitHub Release (GitHub 发行版): https://github.com/llvm/llvm-project/releases
- LLVM For Debian (Debian 下载链接): https://apt.llvm.org/
安装脚本
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
# 19为版本号
sudo ./llvm.sh 19 all
自动链接(可能会影响其他版本号为19的软件)
#!/bin/bash
TOOL_DIR="/usr/bin"
for tool in $TOOL_DIR/*-19; do
base_tool=$(basename "$tool" | sed 's/-19$//')
ln -sf "$tool" "$TOOL_DIR/$base_tool"
echo "Created symlink: $base_tool -> $tool"
done
其他可能需要的工具
apt install -y libzstd-dev libdwarf-dev
apt install -y pipx
pipx install lit
apt install -y zlib1g-dev
apt install -y libedit-dev