Skip to content

Commit 5e04720

Browse files
committed
fix: install LLVM via xlings in bootstrap step + pre-seed to sandbox
1 parent 2b08c7a commit 5e04720

1 file changed

Lines changed: 11 additions & 15 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
5757
echo "$USERPROFILE/.xlings/subos/default/bin" >> "$GITHUB_PATH"
5858
xlings.exe --version
59+
xlings.exe install llvm -y
5960
xlings.exe install mcpp -y
6061
echo "=== Searching for mcpp binary ==="
6162
find "$USERPROFILE/.xlings" -name "mcpp.exe" -o -name "mcpp" 2>/dev/null | head -10
@@ -75,21 +76,16 @@ jobs:
7576
run: |
7677
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
7778
78-
# Install LLVM directly into mcpp sandbox via xlings.
79-
# xlings sandboxed install has issues with large packages on Windows,
80-
# so we use the system xlings binary with XLINGS_HOME pointed at
81-
# the mcpp sandbox to ensure LLVM lands in the right place.
82-
XLINGS_SYS="$USERPROFILE/.xlings/subos/default/bin/xlings.exe"
83-
MCPP_REGISTRY="$USERPROFILE/.mcpp/registry"
84-
export XLINGS_HOME="$MCPP_REGISTRY"
85-
"$XLINGS_SYS" install llvm -y || "$XLINGS_SYS" install llvm@20.1.7 -y
86-
unset XLINGS_HOME
87-
88-
# Verify LLVM is in the mcpp sandbox
89-
LLVM_CHECK="$MCPP_REGISTRY/data/xpkgs/xim-x-llvm"
90-
if [ ! -d "$LLVM_CHECK" ]; then
91-
echo "LLVM not in sandbox, searching..."
92-
find "$USERPROFILE" -path "*/xim-x-llvm/20.1.7/bin/clang++.exe" 2>/dev/null | head -3
79+
# Pre-seed LLVM into mcpp sandbox from system xlings install
80+
MCPP_XPKGS="$USERPROFILE/.mcpp/registry/data/xpkgs"
81+
LLVM_SRC=$(find "$USERPROFILE/.xlings" -path "*/xim-x-llvm/20.1.7/bin/clang++.exe" 2>/dev/null | head -1)
82+
if [ -n "$LLVM_SRC" ]; then
83+
LLVM_PKG_DIR=$(dirname "$(dirname "$(dirname "$LLVM_SRC")")")
84+
mkdir -p "$MCPP_XPKGS"
85+
[ -d "$MCPP_XPKGS/xim-x-llvm" ] || cp -r "$LLVM_PKG_DIR" "$MCPP_XPKGS/xim-x-llvm"
86+
echo "Pre-seeded LLVM from $LLVM_PKG_DIR"
87+
else
88+
echo "WARNING: LLVM not found after xlings install"
9389
fi
9490
9591
"$MCPP" build

0 commit comments

Comments
 (0)