Memory: detect a macOS host under Wine (mac_host) #2351
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2361"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by vakaobr on 2026-11-25T16:40:37Z.
Adds
util::mac_host(): the process runs under Wine on a Mac (CrossOver or the Game Porting Toolkit), where D3D12 is Apple's D3DMetal and the title's code runs through Rosetta 2. ntdll'swine_get_host_versionnames the host's system, and "Darwin" is a Mac;XCL_MAC_HOST=1/0overrides it. Nothing calls it yet: two Mac changes that need to know they run there build on it (thes_barrierdefault and title textures on shared pages, both stacked on this). Until now only themac7branch from #258 had it. Part of #258.What is in it
crates/xcl/src/util.rs:mac_host()(next tounder_wine()), its decision inmac_host_from(forced, sysname), and the testa_mac_host_is_darwin_under_wine_unless_forced.Tested
x86_64-pc-windows-gnu, debug, at6d6a3e3(onmain65fc114).util::tests::a_mac_host_is_darwin_under_wine_unless_forcedandutil::tests::dll_keys, each in its own process in the CrossOver bottle: 2 passed.mac7's, which has been running on this Mac.Regression run
main's. I have no title of my own to runscripts/smoke.ps1on.Not tested
wine_get_host_versiondoes not exist, so it answers false), Wine on Linux, the whole suite.AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:50:14Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T20:55:15Z.
Review: COMMENTED
No concrete source defect found; optional Wine host-version detection and OnceLock use are sound, and this preparatory PR is behavior-neutral today. It is draft/stacked with failing description checks and lacks Windows/Wine whole-suite evidence. Also, XCL_MAC_HOST treats every value except literal "0"—including empty and "false"—as true. Document that conspicuously or accept only 0/1 to avoid accidental activation of future Mac-specific paths.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-30T08:40:03Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:55:32Z.
Triage (#1607) – head
69c0b04No open or merged PR adds
mac_hoston its own, and main has nomac_hostorwine_get_host_version. #2363 and #3525 are stacked on this commit (69c0b04). #2402 and #2492 carry an identical copy of it (6d6a3e3, same patch), so they should be rebased onto this one. Those are stacks, not duplicates.No problems found in the diff: nothing calls
mac_host()yet, and the decision logic is tested inmac_host_from.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.