tests: find LLVM 15 on Windows PATH for the descriptor-store round trip #2205

Manually merged
github merged 2 commits from gh-pr/2205/head into gh-pr/2205/base 2026-11-27 00:05:34 +00:00
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 04:51 UTC · original
RavenCurseBurg:tests/discover-windows-llvm → main · +23 −4 · 1 files · 2 commits · merged 2026-11-25 05:36 UTC

While running the formatted-store fixture for #2022, I put the official Windows LLVM 15.0.7 package on PATH outside Program Files. Its clang.exe, llvm-objcopy.exe and LLVM-C.dll were available, but the fixture still printed llvm15_round_trip=skipped. The package supplies clang’s integrated AMDGPU assembler. The fixture looked for that assembler only in the default install directory. LLVM 15.0.7 release

The Windows clang fallback now looks for all three files together in an absolute PATH directory or the default location. It checks the clang major version before selecting the toolchain. A regression control supplies a non-default directory to the detector.

Verification

Current head 56f05c79 includes the upstream MSVC build fix from #2204. I reran the descriptor-store WARP fixture with the Windows LLVM 15 package on PATH. The round trip matched and the wrong-value control failed at word 14 as expected. The upstream Windows build, Linux checks, and gfx1013 assembly checks passed. Upstream CI · Full Windows 2025 Debug and Release run

  • Ran python -B tests/compute_store_check.py draw-descriptor-store-format <dxc> <offscreen_check> warp on Windows with LLVM 15.0.7 on PATH. Base 33a47702 printed llvm15_round_trip=skipped. This branch printed llvm15_round_trip=match. The real fixture assembled for gfx1013, disassembled, lowered identically and passed WARP readback with 1 and 2 groups. Both refusal cases passed. The wrong 32_UINT store produced the expected mismatch at word 14.
  • Repeated the same WARP command with the portable LLVM directory absent from PATH. The optional round trip was skipped and the readbacks passed.
  • Restoring only the base detector made the new regression control fail. An additional local probe exercised an incomplete directory and a simulated clang 19 ahead of the real LLVM 15 package. The detector selected the complete LLVM 15 directory.
  • git diff --check passed.

AI-assisted with Codex (GPT-6.2 Astra xhigh, as specified by the contributor).

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 04:51 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2205) `RavenCurseBurg:tests/discover-windows-llvm` → `main` · +23 −4 · 1 files · 2 commits · merged 2026-11-25 05:36 UTC While running the formatted-store fixture for #2022, I put the official Windows LLVM 15.0.7 package on `PATH` outside Program Files. Its `clang.exe`, `llvm-objcopy.exe` and `LLVM-C.dll` were available, but the fixture still printed `llvm15_round_trip=skipped`. The package supplies clang’s integrated AMDGPU assembler. The fixture looked for that assembler only in the default install directory. [LLVM 15.0.7 release](https://github.com/llvm/llvm-project/releases/tag/llvmorg-15.0.7) The Windows clang fallback now looks for all three files together in an absolute PATH directory or the default location. It checks the clang major version before selecting the toolchain. A regression control supplies a non-default directory to the detector. ## Verification Current head `56f05c79` includes the upstream MSVC build fix from #2204. I reran the descriptor-store WARP fixture with the Windows LLVM 15 package on PATH. The round trip matched and the wrong-value control failed at word 14 as expected. The upstream Windows build, Linux checks, and gfx1013 assembly checks passed. [Upstream CI](https://github.com/R0Y00/Xbox2Windows/actions/runs/45551379237) · [Full Windows 2025 Debug and Release run](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45551407079) - Ran `python -B tests/compute_store_check.py draw-descriptor-store-format <dxc> <offscreen_check> warp` on Windows with LLVM 15.0.7 on PATH. Base `33a47702` printed `llvm15_round_trip=skipped`. This branch printed `llvm15_round_trip=match`. The real fixture assembled for gfx1013, disassembled, lowered identically and passed WARP readback with 1 and 2 groups. Both refusal cases passed. The wrong 32_UINT store produced the expected mismatch at word 14. - Repeated the same WARP command with the portable LLVM directory absent from PATH. The optional round trip was skipped and the readbacks passed. - Restoring only the base detector made the new regression control fail. An additional local probe exercised an incomplete directory and a simulated clang 19 ahead of the real LLVM 15 package. The detector selected the complete LLVM 15 directory. - `git diff --check` passed. AI-assisted with Codex (GPT-6.2 Astra xhigh, as specified by the contributor).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:05:32 +00:00
github manually merged commit 56f05c7981 into gh-pr/2205/base 2026-11-27 00:05:34 +00:00
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 05:34 UTC · original

The full Windows 2025 Debug run now provides a hosted regression case for this change. On the same ab9a020c base, compute_store_aot_descriptor_store_format_warp selected the system clang and failed with unknown target triple 'amdgcn-unknown-amdpal' on the branch without this detector change. At 56f05c79 the same CTest passed in 10.56 s. The two remaining Debug failures concern temporary-path spelling and PowerShell warning colors in other tests. The portable LLVM 15 binary round trip is recorded separately in the PR description. Before · After

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 05:34 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2205#issuecomment-7153913458) The full Windows 2025 Debug run now provides a hosted regression case for this change. On the same `ab9a020c` base, `compute_store_aot_descriptor_store_format_warp` selected the system clang and failed with `unknown target triple 'amdgcn-unknown-amdpal'` on the branch without this detector change. At `56f05c79` the same CTest passed in 10.56 s. The two remaining Debug failures concern temporary-path spelling and PowerShell warning colors in other tests. The portable LLVM 15 binary round trip is recorded separately in the PR description. [Before](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45551404256/job/138993191243) · [After](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45551407079/job/138993198131)
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 04:57 UTC · original · reviewed

Review of head c59738d855 (tests/compute_store_check.py only).

Findings: 0 P1, 0 P2.

  • find_llvm15() now scans PATH plus the Program Files fallback on Windows, requires clang.exe, llvm-objcopy.exe and LLVM-C.dll together, and checks clang --version for major 15 before use. The os.name == "nt" guard keeps Linux behavior unchanged. A failing or missing clang is skipped (OSError / non-zero exit), so the optional round trip stays optional.
  • The new control in descriptor_store_controls() builds a fake complete toolchain in a temp dir, patches PATH and the version probe, and asserts the exact tuple. It only runs on Windows, as the draw mode that calls it does.
  • No competing PR touches this function.

Commands executed locally:

  • python3 tests/docs_links_check.py -> pass (405 links)
  • python3 tests/bidi_controls_check.py -> pass
  • git diff --check origin/main...HEAD -> clean
  • Control run with the module's os.name forced to nt (Linux): CONTROL_PASS
  • Mutation 1: version regex changed from 15 to 14 -> control fails (AssertionError)
  • Mutation 2: PATH scan removed (only Program Files left) -> control fails (AssertionError)
  • Worktree restored with git checkout -- . after each mutation.

Note: GitHub shows the Windows checks run as action_required (needs maintainer approval), so Build and test on Windows has not run for this head yet.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 04:57 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2205#pullrequestreview-6052067508) · **reviewed** Review of head c59738d8552051ec5f627f9095a9fbc45f6b86eb (tests/compute_store_check.py only). Findings: 0 P1, 0 P2. - `find_llvm15()` now scans PATH plus the Program Files fallback on Windows, requires clang.exe, llvm-objcopy.exe and LLVM-C.dll together, and checks `clang --version` for major 15 before use. The `os.name == "nt"` guard keeps Linux behavior unchanged. A failing or missing clang is skipped (OSError / non-zero exit), so the optional round trip stays optional. - The new control in `descriptor_store_controls()` builds a fake complete toolchain in a temp dir, patches PATH and the version probe, and asserts the exact tuple. It only runs on Windows, as the draw mode that calls it does. - No competing PR touches this function. Commands executed locally: - `python3 tests/docs_links_check.py` -> pass (405 links) - `python3 tests/bidi_controls_check.py` -> pass - `git diff --check origin/main...HEAD` -> clean - Control run with the module's `os.name` forced to `nt` (Linux): `CONTROL_PASS` - Mutation 1: version regex changed from 15 to 14 -> control fails (AssertionError) - Mutation 2: PATH scan removed (only Program Files left) -> control fails (AssertionError) - Worktree restored with `git checkout -- .` after each mutation. Note: GitHub shows the `Windows checks` run as `action_required` (needs maintainer approval), so `Build and test on Windows` has not run for this head yet. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 05:14 UTC · original · reviewed

Review of head 56f05c7981 (tests/compute_store_check.py only).

Result: 0 P1, 0 P2.

What I checked:

  • find_llvm15() now walks PATH (plus the Program Files fallback) on Windows only, requires absolute directories with clang.exe, llvm-objcopy.exe and LLVM-C.dll, and accepts the toolchain only if clang --version reports 15.x. A broken or wrong-version clang is skipped instead of failing the run.
  • The new control in descriptor_store_controls() builds a fake complete toolchain in a temp dir and asserts discovery outside Program Files. It is gated on os.name == "nt", so it only runs where the code under test runs.
  • Overlap: only #1803 (large feature PR, CHANGES_REQUESTED) carries an older copy of find_llvm15; it does not fix the same behavior, so there is no competing fix. It will need a rebase onto this change after merge.

Commands executed locally:

  • git diff --check origin/main...HEAD -> clean
  • python3 tests/docs_links_check.py -> 407 links OK
  • python3 tests/bidi_controls_check.py -> no bidi controls
  • Harness running descriptor_store_controls() with os.name patched to nt -> passes
  • Mutation 1: version regex 15 -> 14 -> new control fails (AssertionError)
  • Mutation 2: PATH-directory branch disabled -> new control fails (AssertionError)
  • Worktree restored with git checkout -- .
  • CI at this head: Linux checks, fixtures, and Build and test on Windows = SUCCESS.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 05:14 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2205#pullrequestreview-6052189250) · **reviewed** Review of head 56f05c79814e1c07206b3160ba673108f11441b2 (tests/compute_store_check.py only). Result: 0 P1, 0 P2. What I checked: - `find_llvm15()` now walks PATH (plus the Program Files fallback) on Windows only, requires absolute directories with clang.exe, llvm-objcopy.exe and LLVM-C.dll, and accepts the toolchain only if `clang --version` reports 15.x. A broken or wrong-version clang is skipped instead of failing the run. - The new control in `descriptor_store_controls()` builds a fake complete toolchain in a temp dir and asserts discovery outside Program Files. It is gated on `os.name == "nt"`, so it only runs where the code under test runs. - Overlap: only #1803 (large feature PR, CHANGES_REQUESTED) carries an older copy of `find_llvm15`; it does not fix the same behavior, so there is no competing fix. It will need a rebase onto this change after merge. Commands executed locally: - `git diff --check origin/main...HEAD` -> clean - `python3 tests/docs_links_check.py` -> 407 links OK - `python3 tests/bidi_controls_check.py` -> no bidi controls - Harness running `descriptor_store_controls()` with `os.name` patched to `nt` -> passes - Mutation 1: version regex 15 -> 14 -> new control fails (AssertionError) - Mutation 2: PATH-directory branch disabled -> new control fails (AssertionError) - Worktree restored with `git checkout -- .` - CI at this head: Linux checks, fixtures, and `Build and test on Windows` = SUCCESS. AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.