@@ -279,8 +279,26 @@ jobs:
279279 --disable-libssh --disable-spice --disable-smartcard \
280280 --disable-usb-redir --disable-opengl --disable-virglrenderer \
281281 --disable-curl
282- ninja -j"$(nproc)"
283- ninja install
282+ # ⚠️ THE EMULATOR TARGET, NOT `ninja` — AND ON THIS HOST THAT IS THE
283+ # DIFFERENCE BETWEEN A BUILD AND A FAILURE.
284+ #
285+ # A bare `ninja` builds QEMU's unit tests too, and one of them does not
286+ # link under MinGW:
287+ #
288+ # FAILED: tests/unit/test-vmstate.exe
289+ # test-vmstate.c:48: undefined reference to `qemu_ftruncate64'
290+ #
291+ # 1897 of 2032 targets had already built. That symbol is a QEMU
292+ # portability shim its own test happens to reference and the Windows
293+ # build does not provide; it says nothing about the emulator, which is
294+ # what this workflow is producing.
295+ #
296+ # ⭐ Naming the target rather than patching the test is the smaller
297+ # claim: a package build has no reason to build a test suite, and
298+ # doing so made the whole leg depend on whether upstream's tests
299+ # happen to be portable this release.
300+ ninja -j"$(nproc)" qemu-system-x86_64
301+ meson install --no-rebuild
284302
285303 # ── The check that the artifact is an emulator, not a file ────────────
286304 #
@@ -373,13 +391,33 @@ jobs:
373391 run : |
374392 set -euo pipefail
375393 QEMU=$(find out -name 'qemu-system-x86_64*' -type f | head -1)
376- ls -l "$QEMU"
394+ echo "before stripping:"; ls -l "$QEMU"; du -sh out
395+
396+ # ⚠️ STRIPPED, BECAUSE THE UNSTRIPPED FIGURE IS NOT A PAYLOAD SIZE AND
397+ # THE INDEX HAS PAID FOR THAT CONFUSION ONCE ALREADY.
398+ #
399+ # Measured on the first green legs: 392M (linux-x64), 389M
400+ # (linux-arm64), 341M/342M (darwin). Those are debug symbols, not an
401+ # emulator. A previous payload in this ecosystem was 34.81 MB and
402+ # became 4.62 MB once stripped, and the upload failures that had been
403+ # blamed on the mirror were the size.
404+ #
405+ # ⚠️ NOT ON macOS. Stripping a Mach-O invalidates its ad-hoc
406+ # signature, which is the rule this ecosystem's own release pipeline
407+ # follows; the darwin legs report the unstripped figure and say so.
377408 case "$RUNNER_OS" in
378- Linux) readelf -d "$QEMU" | grep NEEDED || true ;;
379- macOS) otool -L "$QEMU" || true ;;
380- Windows) echo "(the DLL closure is measured in the packaging step, not here)" ;;
409+ Linux)
410+ find out -type f \( -name 'qemu-system-*' -o -name '*.so*' \) -exec strip --strip-unneeded {} + 2>/dev/null || true
411+ echo "after stripping:"; ls -l "$QEMU"; du -sh out
412+ readelf -d "$QEMU" | grep NEEDED || true ;;
413+ macOS)
414+ echo "(not stripped: it would invalidate the ad-hoc signature)"
415+ otool -L "$QEMU" || true ;;
416+ Windows)
417+ find out -type f -name '*.exe' -exec strip --strip-unneeded {} + 2>/dev/null || true
418+ echo "after stripping:"; ls -l "$QEMU"; du -sh out
419+ echo "(the DLL closure is measured in the packaging step, not here)" ;;
381420 esac
382- du -sh out
383421
384422 - uses : actions/upload-artifact@v4
385423 with :
0 commit comments