[PR #877] [MERGED] build: link synchronization for the Rust XMA2 decoder (BUILD-XMA2-SYNCH-LIB) #917

Closed
opened 2026-11-26 20:19:29 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/877
Author: @UwUCammie
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @aslan2142

Base: main ← Head: pr/xma2-synchronization-lib


📝 Commits (1)

  • efe544d build: link synchronization for the Rust XMA2 decoder (BUILD-XMA2-SYNCH-LIB)

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 runtime/CMakeLists.txt (+3 -1)

📄 Description

Claimed in the coordination issue as: BUILD-XMA2-SYNCH-LIB

What and why

runtime/xma_decoder (#404) is linked into gta6rt and acphal_test with kernel32;ntdll;userenv;ws2_32;dbghelp. Rust's std also imports WaitOnAddress, WakeByAddressSingle and WakeByAddressAll, which live in synchronization.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:

lld-link: error: undefined symbol: __declspec(dllimport) WakeByAddressSingle
lld-link: error: undefined symbol: __declspec(dllimport) WakeByAddressAll
lld-link: error: undefined symbol: __declspec(dllimport) WaitOnAddress

This names synchronization next to the decoder's other link dependencies, with a comment saying why.

Tested

  • Linux cross build with clang-cl and an xwin SDK (cmake --build <build> --target gta6rt acphal_test): the link fails as above without the change and succeeds with it.
  • acphal_test.exe under Wine 11.22 with the decoder linked: 170 checks, 0 failures.
  • Run on a branch that carries the same runtime/CMakeLists.txt change on top of #404; this branch is only that one-line change on main.

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

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/877 **Author:** [@UwUCammie](https://github.com/UwUCammie) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@aslan2142](https://github.com/aslan2142) **Base:** `main` ← **Head:** `pr/xma2-synchronization-lib` --- ### 📝 Commits (1) - [`efe544d`](https://github.com/ubiquitarianism/leonida/commit/efe544dac0133e0aeab72fc038f983bd9b33995d) build: link synchronization for the Rust XMA2 decoder (BUILD-XMA2-SYNCH-LIB) ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+3 -1) </details> ### 📄 Description Claimed in the coordination issue as: BUILD-XMA2-SYNCH-LIB ### What and why `runtime/xma_decoder` (#404) is linked into `gta6rt` and `acphal_test` with `kernel32;ntdll;userenv;ws2_32;dbghelp`. Rust's std also imports `WaitOnAddress`, `WakeByAddressSingle` and `WakeByAddressAll`, which live in `synchronization.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: ``` lld-link: error: undefined symbol: __declspec(dllimport) WakeByAddressSingle lld-link: error: undefined symbol: __declspec(dllimport) WakeByAddressAll lld-link: error: undefined symbol: __declspec(dllimport) WaitOnAddress ``` This names `synchronization` next to the decoder's other link dependencies, with a comment saying why. ### Tested - Linux cross build with clang-cl and an xwin SDK (`cmake --build <build> --target gta6rt acphal_test`): the link fails as above without the change and succeeds with it. - `acphal_test.exe` under Wine 11.22 with the decoder linked: `170 checks, 0 failures`. - Run on a branch that carries the same `runtime/CMakeLists.txt` change on top of #404; this branch is only that one-line change on `main`. 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 - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:29 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#917
No description provided.