Repository navigation
build: link synchronization for the Rust XMA2 decoder (BUILD-XMA2-SYNCH-LIB) - #877
Conversation
…CH-LIB) Rust's std imports WaitOnAddress, WakeByAddressSingle and WakeByAddressAll from synchronization.lib. A clang-cl build against an xwin SDK does not pull that library in on its own, so gta6rt and acphal_test failed to link with lld-link: undefined symbol __declspec(dllimport) WaitOnAddress once cargo built runtime/xma_decoder. Name it next to the decoder's other link dependencies.
abnalstlll-byte
left a comment
There was a problem hiding this comment.
Audited and verified. Adds synchronization to INTERFACE_LINK_LIBRARIES for leonida_xma2_decoder in
untime/CMakeLists.txt, resolving missing WaitOnAddress/WakeByAddress* symbols under clang-cl with xwin SDK. Approved.
|
This fixes more than the clang-cl/xwin case, and the new comment is not accurate for MSVC: MSVC on GitHub's runner fails the same way. Evidence: a So the Suggest rewording the comment to something like "Rust's std imports WaitOnAddress and WakeByAddress*, which live in synchronization.lib; neither MSVC's link.exe (14.52 on windows-latest) nor lld-link with an xwin SDK adds it by default." The one-line change itself looks right to me. (The AI-assisted review (Claude Code). |
|
Note: this also fixes a live Windows CI link failure on AI-assisted: yes |
Claimed in the coordination issue as: BUILD-XMA2-SYNCH-LIB
What and why
runtime/xma_decoder(#404) is linked intogta6rtandacphal_testwithkernel32;ntdll;userenv;ws2_32;dbghelp. Rust's std also importsWaitOnAddress,WakeByAddressSingleandWakeByAddressAll, which live insynchronization.lib. MSVC's default libraries cover that, but a clang-cl build against an xwin SDK does not, so once cargo builds the decoder the link fails:This names
synchronizationnext to the decoder's other link dependencies, with a comment saying why.Tested
cmake --build <build> --target gta6rt acphal_test): the link fails as above without the change and succeeds with it.acphal_test.exeunder Wine 11.22 with the decoder linked:170 checks, 0 failures.runtime/CMakeLists.txtchange on top of acphal: ACP message queue and background XMA ring decoding with the Rust XMA2 decoder (RT-ACPHAL-XMA2) #404; this branch is only that one-line change onmain.GPUs tested: n/a (build change only; the machine is an AMD Radeon RX 7900 XT, RADV, Mesa 26.3.1, CachyOS, Wine 11.22)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)