[PR #995] BUILD-XMA2-OPT-IN: gate configure-time Cargo XMA2 build behind -DLEONIDA_XMA2_DECODER=ON (#963) #1031

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

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/995
Author: @markankamaransheogarat-sys
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: ubiq/cmake-xma2-opt-in


📝 Commits (2)

  • 9bc6e15 BUILD-XMA2-OPT-IN: gate configure-time Cargo XMA2 build behind -DLEONIDA_XMA2_DECODER=ON (#963)
  • 6ac4d70 fix(cmake): restore closing parenthesis and LEONIDA_REQUIRE_XMA2_DECODER fatal check

📊 Changes

3 files changed (+32 additions, -3 deletions)

View changed files

📝 runtime/CMakeLists.txt (+5 -2)
📝 runtime/xma_decoder/README.md (+1 -1)
➕ tests/test_cmake_xma2_opt_in.py (+26 -0)

📄 Description

Summary

  • Addresses the supply-chain note in #963: runtime/CMakeLists.txt previously ran cargo build (fetching github.com/omonkeyz/xbox-emulator) at CMake configure time whenever cargo was on PATH.
  • Adds option(LEONIDA_XMA2_DECODER "Build the Rust XMA2 decoder at configure time" OFF) and gates find_program(LEONIDA_CARGO cargo) + execute_process(...) on if(LEONIDA_XMA2_DECODER OR LEONIDA_REQUIRE_XMA2_DECODER).
  • .github/workflows/runtime.yml already passes -DLEONIDA_REQUIRE_XMA2_DECODER=ON, so CI continues to build and require the decoder unchanged.
  • Updates runtime/xma_decoder/README.md and adds tests/test_cmake_xma2_opt_in.py.

Verification

  • python3 -I tests/test_cmake_xma2_opt_in.py: 1/1 passed.
  • python3 -I scripts/check_no_game_data.py runtime/CMakeLists.txt runtime/xma_decoder/README.md tests/test_cmake_xma2_opt_in.py: passed.

AI-assisted: yes (no game files).


🔄 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/995 **Author:** [@markankamaransheogarat-sys](https://github.com/markankamaransheogarat-sys) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `ubiq/cmake-xma2-opt-in` --- ### 📝 Commits (2) - [`9bc6e15`](https://github.com/ubiquitarianism/leonida/commit/9bc6e1570efbc78f2dec24c43fbf16b70de04562) BUILD-XMA2-OPT-IN: gate configure-time Cargo XMA2 build behind -DLEONIDA_XMA2_DECODER=ON (#963) - [`6ac4d70`](https://github.com/ubiquitarianism/leonida/commit/6ac4d7060ef2dbe2ffcbf7f41a0b7f8c369df727) fix(cmake): restore closing parenthesis and LEONIDA_REQUIRE_XMA2_DECODER fatal check ### 📊 Changes **3 files changed** (+32 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+5 -2) 📝 `runtime/xma_decoder/README.md` (+1 -1) ➕ `tests/test_cmake_xma2_opt_in.py` (+26 -0) </details> ### 📄 Description ### Summary - Addresses the supply-chain note in #963: `runtime/CMakeLists.txt` previously ran `cargo build` (fetching `github.com/omonkeyz/xbox-emulator`) at CMake configure time whenever `cargo` was on `PATH`. - Adds `option(LEONIDA_XMA2_DECODER "Build the Rust XMA2 decoder at configure time" OFF)` and gates `find_program(LEONIDA_CARGO cargo)` + `execute_process(...)` on `if(LEONIDA_XMA2_DECODER OR LEONIDA_REQUIRE_XMA2_DECODER)`. - `.github/workflows/runtime.yml` already passes `-DLEONIDA_REQUIRE_XMA2_DECODER=ON`, so CI continues to build and require the decoder unchanged. - Updates `runtime/xma_decoder/README.md` and adds `tests/test_cmake_xma2_opt_in.py`. ### Verification - `python3 -I tests/test_cmake_xma2_opt_in.py`: 1/1 passed. - `python3 -I scripts/check_no_game_data.py runtime/CMakeLists.txt runtime/xma_decoder/README.md tests/test_cmake_xma2_opt_in.py`: passed. AI-assisted: yes (no game files). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1031
No description provided.