Skip to content

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

Open
markankamaransheogarat-sys wants to merge 2 commits into
ProjectLeonida:mainfrom
markankamaransheogarat-sys:ubiq/cmake-xma2-opt-in
Open

markankamaransheogarat-sys wants to merge 2 commits into
ProjectLeonida:mainfrom
markankamaransheogarat-sys:ubiq/cmake-xma2-opt-in

Conversation

@markankamaransheogarat-sys

Copy link
Copy Markdown
Contributor

Summary

  • Addresses the supply-chain note in Security review of everything merged since 5d74c27 (no malware found; one build-time supply-chain note) #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).

@KernelSmoker KernelSmoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head b30db41. On latest main 82a2aab, the new Python regression passed 1/1, docs links 16/16, no-game-data scan and diff check passed. I also configured the Windows-only CMake branch in a disposable Fedora 45 environment with a fake Cargo executable: with LEONIDA_XMA2_DECODER=OFF, configure completed and Cargo was not invoked; with the option ON, it invoked Cargo and tolerated the simulated build failure when not required; with LEONIDA_REQUIRE_XMA2_DECODER=ON, the same failure stopped configuration as required. This tests the gating and required-mode behavior, not a real Rust/XMA2 build or Windows runtime. Hosted checks were queued at review time.

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 24, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with the base branch: rebase it on main label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants