Installs converted for void.

This commit is contained in:
2026-09-23 12:50:06 +02:00
parent 9ce77ad817
commit d4cb9100c0
2 changed files with 37 additions and 18 deletions
+20 -10
View File
@@ -1,15 +1,11 @@
#!/bin/bash
# ---------------------------------------------------------------------------------
# Odin compiler install recipe
# Target: Pop!_OS / Ubuntu / Debian
# Builds from source - recommended method on Linux
# ---------------------------------------------------------------------------------
set -e
ODIN_DIR="$HOME/.odin"
echo "Installing Odin build dependencies..."
sudo apt update
sudo apt install -y llvm-18-dev clang-18 git-lfs build-essential
sudo xbps-install -S
sudo xbps-install -y llvm18-devel clang18 git-lfs base-devel
git lfs install --force
echo "Cloning Odin repository..."
@@ -21,10 +17,24 @@ else
cd "$ODIN_DIR"
fi
echo "Building Odin compiler..."
LLVM_CONFIG=llvm-config-18 make release-native
# Detect available LLVM 18 config tool name on Void
LLVM_CFG=""
for cfg in llvm-config-18 llvm-config18 llvm-config; do
if command -v "$cfg" >/dev/null 2>&1; then
LLVM_CFG="$cfg"
break
fi
done
if [ -z "$LLVM_CFG" ]; then
echo "❌ Error: Could not locate a valid llvm-config binary."
exit 1
fi
echo "Building Odin compiler using $LLVM_CFG..."
LLVM_CONFIG="$LLVM_CFG" make release-native
echo ""
echo "✓ Odin install complete."
echo " Add to your path if needed: export PATH=\"\$HOME/.odin:\$PATH\""
echo " Then verify with: odin version"
echo " Then verify with: odin version"