Skip to content

Commit 198c257

Browse files
committed
fix: install LLVM via xlings before mcpp on Windows CI/release
xlings sandboxed binary has an upstream bug where large package (LLVM 148MB) extraction fails on Windows — the download completes but the payload doesn't appear at the expected xpkgs path. Workaround: install LLVM via the system-level xlings before mcpp. mcpp's package_fetcher finds it from the global xlings data dir. The package_fetcher fallback (checking ~/.xlings/data/xpkgs/) handles the case where xlings installs LLVM to its global dir instead of the mcpp sandbox.
1 parent 18ba621 commit 198c257

2 files changed

Lines changed: 6 additions & 18 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ jobs:
5656
export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
5757
echo "$USERPROFILE/.xlings/subos/default/bin" >> "$GITHUB_PATH"
5858
xlings.exe --version
59+
# Install LLVM first via system xlings — mcpp's sandboxed xlings
60+
# has an upstream bug where large package extraction fails on Windows.
61+
# See: https://github.com/mcpp-community/mcpp/pull/53
62+
xlings.exe install llvm -y || xlings.exe install llvm@20.1.7 -y
5963
xlings.exe install mcpp -y
6064
echo "=== Searching for mcpp binary ==="
6165
find "$USERPROFILE/.xlings" -name "mcpp.exe" -o -name "mcpp" 2>/dev/null | head -10
@@ -75,24 +79,7 @@ jobs:
7579
run: |
7680
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
7781
78-
# Debug: check mcpp sandbox state before build
79-
echo "=== mcpp self env ==="
80-
"$MCPP" self env || true
81-
echo "=== mcpp sandbox xlings binary ==="
82-
SANDBOX_XLINGS="$USERPROFILE/.mcpp/registry/bin/xlings.exe"
83-
if [ -f "$SANDBOX_XLINGS" ]; then
84-
echo "exists: $SANDBOX_XLINGS"
85-
XLINGS_HOME="$USERPROFILE/.mcpp/registry" "$SANDBOX_XLINGS" --version || true
86-
else
87-
echo "NOT FOUND: $SANDBOX_XLINGS"
88-
fi
89-
90-
"$MCPP" build || {
91-
echo "=== After failed build ==="
92-
find "$USERPROFILE/.mcpp" -maxdepth 5 -name "xim-x-llvm" -type d 2>/dev/null
93-
find "$USERPROFILE/.xlings" -maxdepth 5 -name "xim-x-llvm" -type d 2>/dev/null
94-
exit 1
95-
}
82+
"$MCPP" build
9683
9784
MCPP_SELF=$(find target -name "mcpp.exe" -path "*/bin/*" | head -1)
9885
test -n "$MCPP_SELF" || { echo "FAIL: no mcpp.exe"; exit 1; }

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ jobs:
462462
export PATH="$USERPROFILE/.xlings/subos/default/bin:$PATH"
463463
echo "$USERPROFILE/.xlings/subos/default/bin" >> "$GITHUB_PATH"
464464
xlings.exe --version
465+
xlings.exe install llvm -y || xlings.exe install llvm@20.1.7 -y
465466
xlings.exe install mcpp -y
466467
MCPP=$(find "$USERPROFILE/.xlings" -name "mcpp.exe" -path "*/bin/*" 2>/dev/null | head -1)
467468
if [ -z "$MCPP" ]; then

0 commit comments

Comments
 (0)