docs/testing.md: the Windows runtime tests under Wine on a Mac (WineHQ build, ROSETTA_ADVERTISE_AVX) #2364

Merged
Tauwni merged 2 commits from upstream-pr/2364 into main 2026-12-01 12:47:46 +00:00
Tauwni commented 2026-11-26 15:40:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-26T15:40:01Z.


docs/testing.md's section on the Windows runtime under Wine only covers Linux. On a Mac, two things stop someone who follows it:

  • Installing Wine. Homebrew's wine-stable, wine@devel and wine@staging casks are disabled because they don't pass Gatekeeper, so brew install --cask wine-stable refuses. The WineHQ macOS build works: I downloaded the archive at the cask's url and checked it against the cask's sha256.
  • AVX under Rosetta. That Wine is x86-64 and runs under Rosetta, which hides AVX unless ROSETTA_ADVERTISE_AVX=1 is set. Without it, the 21 run_tiny_* loader tests stop with "the game's code needs AVX, and this CPU or OS lacks AVX, OSXSAVE". docs/boot.md mentions the variable, but only for the #UD emulation work.

This adds one paragraph after the xwin note. It gives the Homebrew tools, where the cross tools live, how to point CMAKE_CROSSCOMPILING_EMULATOR at that Wine (a wrapper helps with the space in Wine Stable.app), the variable, and what I measured.

Measured on an Apple M3 (macOS 26.5.1, Wine 11.0 with its bundled MoltenVK 1.4.1) at main fbf100b1b, cross-built with clang-cl/lld-link 23.1.6 and xwin 0.10.0 (SDK 10.0.26100):

  • 1084 targets build;
  • ctest -j 6 --timeout 120: 440 of 482 pass, and 461 of 482 with ROSETTA_ADVERTISE_AVX=1.

The 21 left are listed in my comment on #1086, which fixes 4 of them, and #1219 covers vk_device_filter_tools. tests/test_docs_*.py pass.

AI-assisted (Claude Code). No game data.

🤖 Generated with Claude Code

Red checks: from main, not this change

The failing jobs (check, macos-python, stdlib-tests-linux, linux-gpu-tools, macos, windows) fail the same way on main d48a957bb (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them:

Failing on main Fixed by
test_docs_cli_flags #2536
test_make_game_preflight, test_progress_dashboard (repository URL) #2550
test_docs_repo_paths #2552 (all 14 paths; it conflicts with main, a merge is on Tauwni:fix/2552-merge-main, correction)
test_tool_stdout_encoding #2531, plus two scripts on Tauwni:fix/stdout-replace-two-new-scripts (no PR, open PR limit)
test_windows_boot_journal_seed #2514
test_docs_python_deps passes with the fixes above merged
test_build_runtime_fallback #2573 (passes with it, macOS, 1 run)
vk_bindless_dimensions (macOS) #2441
test_docs_env_vars DOC-CLWB-SETTING (fix)
test_make_game_pipelines, test_sampler_source_census, test_spirv_metal_set0_cli_errors, test_spirv_metal_set0_extra, tests/semantic/test_valu_cvt_f16_int16_mods.py, ps_exp_f32_denorm_rt (macOS) branches on Tauwni/leonida, no PR (finding)
cs_imgatomic_ext (macOS, linux-gpu-tools) #1518, closed without a comment
vk_xdxr_postbuild_readback (Windows) already passes on main: merge main

Not checked by a second agent or human yet.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5512965357 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2364). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-26T15:40:01Z. --- `docs/testing.md`'s section on the Windows runtime under Wine only covers Linux. On a Mac, two things stop someone who follows it: - **Installing Wine.** Homebrew's `wine-stable`, `wine@devel` and `wine@staging` casks are disabled because they don't pass Gatekeeper, so `brew install --cask wine-stable` refuses. The WineHQ macOS build works: I downloaded the archive at the cask's `url` and checked it against the cask's `sha256`. - **AVX under Rosetta.** That Wine is x86-64 and runs under Rosetta, which hides AVX unless `ROSETTA_ADVERTISE_AVX=1` is set. Without it, the 21 `run_tiny_*` loader tests stop with "the game's code needs AVX, and this CPU or OS lacks AVX, OSXSAVE". `docs/boot.md` mentions the variable, but only for the #UD emulation work. This adds one paragraph after the xwin note. It gives the Homebrew tools, where the cross tools live, how to point `CMAKE_CROSSCOMPILING_EMULATOR` at that Wine (a wrapper helps with the space in `Wine Stable.app`), the variable, and what I measured. Measured on an Apple M3 (macOS 26.5.1, Wine 11.0 with its bundled MoltenVK 1.4.1) at `main` `fbf100b1b`, cross-built with clang-cl/lld-link 23.1.6 and xwin 0.10.0 (SDK 10.0.26100): - 1084 targets build; - `ctest -j 6 --timeout 120`: 440 of 482 pass, and 461 of 482 with `ROSETTA_ADVERTISE_AVX=1`. The 21 left are listed in my comment on #1086, which fixes 4 of them, and #1219 covers `vk_device_filter_tools`. `tests/test_docs_*.py` pass. AI-assisted (Claude Code). No game data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) ### Red checks: from `main`, not this change The failing jobs (`check`, `macos-python`, `stdlib-tests-linux`, `linux-gpu-tools`, `macos`, `windows`) fail the same way on `main` `d48a957bb` (MEASURED on macOS for the Python tests, 1 run, with the same assertion text; GPU tests READ from this PR's CI logs). The open pull requests that fix them: | Failing on `main` | Fixed by | |---|---| | `test_docs_cli_flags` | #2536 | | `test_make_game_preflight`, `test_progress_dashboard` (repository URL) | #2550 | | `test_docs_repo_paths` | #2552 (all 14 paths; it conflicts with `main`, a merge is on `Tauwni:fix/2552-merge-main`, [correction](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239890652)) | | `test_tool_stdout_encoding` | #2531, plus two scripts on `Tauwni:fix/stdout-replace-two-new-scripts` (no PR, open PR limit) | | `test_windows_boot_journal_seed` | #2514 | | `test_docs_python_deps` | passes with the fixes above merged | | `test_build_runtime_fallback` | #2573 (passes with it, macOS, 1 run) | | `vk_bindless_dimensions` (macOS) | #2441 | | `test_docs_env_vars` | DOC-CLWB-SETTING ([fix](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7238921436)) | | `test_make_game_pipelines`, `test_sampler_source_census`, `test_spirv_metal_set0_cli_errors`, `test_spirv_metal_set0_extra`, `tests/semantic/test_valu_cvt_f16_int16_mods.py`, `ps_exp_f32_denorm_rt` (macOS) | branches on `Tauwni/leonida`, no PR ([finding](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7239812627)) | | `cs_imgatomic_ext` (macOS, linux-gpu-tools) | #1518, closed without a comment | | `vk_xdxr_postbuild_readback` (Windows) | already passes on `main`: merge `main` | Not checked by a second agent or human yet.
aslan2142 commented 2026-12-01 11:00:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:00:41Z.

Review: COMMENTED


Reviewed the diff against current main: documenting Homebrew llvm/lld/xwin, the WineHQ macOS build, and ROSETTA_ADVERTISE_AVX=1 in docs/testing.md is clear, well-measured, clean-room compliant, merges cleanly, and change-scope / no-game-data are green.

Ready to merge as soon as this draft is marked ready for review.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6129921764 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2364#pullrequestreview-6129921764). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:00:41Z. **Review:** COMMENTED --- Reviewed the diff against current `main`: documenting Homebrew `llvm`/`lld`/`xwin`, the WineHQ macOS build, and `ROSETTA_ADVERTISE_AVX=1` in `docs/testing.md` is clear, well-measured, clean-room compliant, merges cleanly, and `change-scope` / `no-game-data` are green. Ready to merge as soon as this draft is marked ready for review. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 12:32:20 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:32:20Z.


Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.

(AI-assisted triage.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7311276162 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2364#issuecomment-7311276162). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:32:20Z. --- Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review. *(AI-assisted triage.)*
aslan2142 commented 2026-12-01 12:45:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T12:45:16Z.

Review: APPROVED


Now ready for review, MERGEABLE/CLEAN, and all checks are green. Clean-room verified docs/testing.md addition documenting macOS Apple Silicon WineHQ cross-compilation and ROSETTA_ADVERTISE_AVX=1. Approving and merging.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6131494450 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2364#pullrequestreview-6131494450). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T12:45:16Z. **Review:** APPROVED --- Now ready for review, `MERGEABLE`/`CLEAN`, and all checks are green. Clean-room verified `docs/testing.md` addition documenting macOS Apple Silicon WineHQ cross-compilation and `ROSETTA_ADVERTISE_AVX=1`. Approving and merging. *(AI-assisted review.)*
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2364
No description provided.