Skip to content

Commit ae24e9b

Browse files
committed
fix(release/aarch64): two-stage cross-build — bootstrap builds fresh mcpp, then it cross-builds aarch64
The published bootstrap mcpp (0.0.58) predates aarch64 cross-build support (#146/#148), so 'mcpp build --target aarch64-linux-musl' resolved the x86_64 host musl-gcc and produced no aarch64 binary. Build this release's x86_64 mcpp first (it has the feature), then cross-build aarch64 with it. Verified locally: fresh 0.0.59 resolves aarch64-linux-musl-gcc and emits an ARM aarch64 static ELF.
1 parent 75c6ff7 commit ae24e9b

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,14 @@ jobs:
303303
run: |
304304
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
305305
mcpp self config --mirror GLOBAL 2>/dev/null || true
306-
mcpp build --target aarch64-linux-musl
306+
# The published bootstrap mcpp predates aarch64 cross-build support
307+
# (the feature landed after the last release), so it resolves the
308+
# x86_64 host musl-gcc for an aarch64 target. Two-stage instead: build
309+
# THIS release's x86_64 mcpp first, then cross-build aarch64 with it.
310+
mcpp build --target x86_64-linux-musl
311+
FRESH=$(find target/x86_64-linux-musl -type f -name mcpp | head -1)
312+
test -n "$FRESH"
313+
"$FRESH" build --target aarch64-linux-musl
307314
BIN=$(find target/aarch64-linux-musl -type f -name mcpp | head -1)
308315
test -n "$BIN"
309316
file "$BIN" | grep -q 'ARM aarch64'

0 commit comments

Comments
 (0)