cpu: normalize Windows compiler basename in EXE CLI reports #2659

Merged
chadhyatt merged 5 commits from upstream-pr/2667 into main 2026-11-26 03:04:49 +00:00
chadhyatt commented 2026-11-26 01:34:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T01:34:24Z.


AI-assisted backport patch from x2w-microlift.

Refs #2605. On macOS, Path(compiler).name treats a Windows-style C:\fake\cl.exe path as one filename, causing two existing portable CLI assertions to fail. Use PureWindowsPath once for the reported compiler basename; the subprocess command is unchanged.

Verification: macOS ARM64, Python 3.15.2, head 76cad03ec53369ffa93eaa474f43d2e97d7585ae on upstream 728797973394af8088106e7ef8531b1d1f59b00b.

python -B tests/cpu_exe_aot_cli_check.py - 9 tests PASS (previously 2 failures). Existing source-built fixtures only. No Windows runtime or full CI run locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6617490174 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2667). Originally posted by [chadhyatt](https://github.com/chadhyatt) on 2026-11-26T01:34:24Z. --- AI-assisted backport patch from x2w-microlift. Refs #2605. On macOS, `Path(compiler).name` treats a Windows-style `C:\fake\cl.exe` path as one filename, causing two existing portable CLI assertions to fail. Use `PureWindowsPath` once for the reported compiler basename; the subprocess command is unchanged. Verification: macOS ARM64, Python 3.15.2, head `76cad03ec53369ffa93eaa474f43d2e97d7585ae` on upstream `728797973394af8088106e7ef8531b1d1f59b00b`. `python -B tests/cpu_exe_aot_cli_check.py` - 9 tests PASS (previously 2 failures). Existing source-built fixtures only. No Windows runtime or full CI run locally.
tedin7 commented 2026-11-26 03:03:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T02:18:00Z.

Review: COMMENTED


Review of head 76cad03e.

What I checked:

  • tools/exe_aot.py: the compiler basename is now computed once with PureWindowsPath(compiler).name and reused in the three Refusal messages and the return value. The subprocess command is unchanged. Forward-slash POSIX paths still give the right name, since PureWindowsPath accepts both separators.
  • Existing test tests/cpu_exe_aot_cli_check.py (CTest cpu_exe_aot_cli_check) already covers the Windows-style cl.exe path, so no new test is needed.
  • No other open or merged PR covers this slice.

Commands run (Linux, worktree at the exact head):

  • python -B tests/cpu_exe_aot_cli_check.py -> Ran 9 tests, OK
  • Mutation (PureWindowsPath(compiler).name -> Path(compiler).name): the suite FAILS (2 failures); restored after.
  • git diff --check origin/main...HEAD -> clean
  • python3 tests/docs_links_check.py and python3 tests/bidi_controls_check.py -> passed

Verdict: sound, small, Python-only.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6067680883 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2667#pullrequestreview-6067680883). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T02:18:00Z. **Review:** COMMENTED --- Review of head 76cad03e. What I checked: - `tools/exe_aot.py`: the compiler basename is now computed once with `PureWindowsPath(compiler).name` and reused in the three Refusal messages and the return value. The subprocess command is unchanged. Forward-slash POSIX paths still give the right name, since `PureWindowsPath` accepts both separators. - Existing test `tests/cpu_exe_aot_cli_check.py` (CTest `cpu_exe_aot_cli_check`) already covers the Windows-style `cl.exe` path, so no new test is needed. - No other open or merged PR covers this slice. Commands run (Linux, worktree at the exact head): - `python -B tests/cpu_exe_aot_cli_check.py` -> Ran 9 tests, OK - Mutation (`PureWindowsPath(compiler).name` -> `Path(compiler).name`): the suite FAILS (2 failures); restored after. - `git diff --check origin/main...HEAD` -> clean - `python3 tests/docs_links_check.py` and `python3 tests/bidi_controls_check.py` -> passed Verdict: sound, small, Python-only. AI-assisted; commands listed were executed locally.
R0Y00 commented 2026-11-26 03:03:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T02:52:21Z.

Review: APPROVED


Reproduced the earlier branch CI failure in the unrelated scalar operand arity check. After integrating the fix already on main, all nine EXE CLI tests and the scalar arity controls pass locally. Compiler invocation is unchanged, and the reported compiler basename now handles Windows paths on a non-Windows host.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6067913477 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2667#pullrequestreview-6067913477). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T02:52:21Z. **Review:** APPROVED --- Reproduced the earlier branch CI failure in the unrelated scalar operand arity check. After integrating the fix already on main, all nine EXE CLI tests and the scalar arity controls pass locally. Compiler invocation is unchanged, and the reported compiler basename now handles Windows paths on a non-Windows host.
chadhyatt commented 2026-11-26 03:03:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T02:18:44Z.


Thanks for the focused review and mutation control. The updated head includes the main merge and the same standalone tools/exe_aot.py change. No additional changes requested on my side.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7180678213 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2667#issuecomment-7180678213). Originally posted by [chadhyatt](https://github.com/chadhyatt) on 2026-11-26T02:18:44Z. --- Thanks for the focused review and mutation control. The updated head includes the main merge and the same standalone tools/exe_aot.py change. No additional changes requested on my side.
chadhyatt commented 2026-11-26 03:03:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T02:32:15Z.


The updated-head Linux job reports a failure in tests/startup_gfx2hlsl_scalar_table_arity_check.py (run 45741494549, job 139647331898). This PR changes only compiler-path reporting in tools/exe_aot.py; the reviewed CLI suite passed, and the failure is in an unrelated translator suite after the main merge. I will keep this patch focused.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7180894505 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2667#issuecomment-7180894505). Originally posted by [chadhyatt](https://github.com/chadhyatt) on 2026-11-26T02:32:15Z. --- The updated-head Linux job reports a failure in tests/startup_gfx2hlsl_scalar_table_arity_check.py (run 45741494549, job 139647331898). This PR changes only compiler-path reporting in tools/exe_aot.py; the reviewed CLI suite passed, and the failure is in an unrelated translator suite after the main merge. I will keep this patch focused.
chadhyatt commented 2026-11-26 03:03:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chadhyatt on 2026-11-26T02:54:48Z.


Updated-head Windows job 139659428598 fails in d3d12_xs_device.cpp with C2086 duplicate Pass::bound_targets and Pass::bound_depth declarations. The current upstream main I fetched already has a single declaration of each, so this appears to be an intervening inherited regression. The standalone exe_aot.py change is still unchanged; no additional patch added.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181228602 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2667#issuecomment-7181228602). Originally posted by [chadhyatt](https://github.com/chadhyatt) on 2026-11-26T02:54:48Z. --- Updated-head Windows job 139659428598 fails in d3d12_xs_device.cpp with C2086 duplicate Pass::bound_targets and Pass::bound_depth declarations. The current upstream main I fetched already has a single declaration of each, so this appears to be an intervening inherited regression. The standalone exe_aot.py change is still unchanged; no additional patch added.
upstream-sync closed this pull request 2026-11-26 04:04:12 +00:00
tedin7 commented 2026-11-26 04:04:35 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:04:20Z.


Win2025 WARP receipt for head e78a34da after updating with main.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit e78a34da11f8c2381dc4dc96630217dd56ca68b7:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset dev -R 'exe_aot' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (9.73s: cpu_stdio_exe_aot_check 1.34s, cpu_exe_aot_convert 6.66s, cpu_exe_aot_cli_check 8.12s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release -- -j 2): 0.00s (configure 0.00s)
    • Test (ctest --preset release -R 'exe_aot' --parallel 2 --no-tests=error --output-on-failure): 3/3 passed (8.69s: cpu_exe_aot_convert 7.11s, cpu_exe_aot_cli_check 8.30s, cpu_stdio_exe_aot_check 1.34s)
  • sccache: 1/4 hits; wall 27.3s

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181369428 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2667#issuecomment-7181369428). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T03:04:20Z. --- Win2025 WARP receipt for head e78a34da after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `e78a34da11f8c2381dc4dc96630217dd56ca68b7`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset dev -R 'exe_aot' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`9.73s`: `cpu_stdio_exe_aot_check` `1.34s`, `cpu_exe_aot_convert` `6.66s`, `cpu_exe_aot_cli_check` `8.12s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release -- -j 2`): `0.00s` (configure `0.00s`) - Test (`ctest --preset release -R 'exe_aot' --parallel 2 --no-tests=error --output-on-failure`): **3/3 passed** (`8.69s`: `cpu_exe_aot_convert` `7.11s`, `cpu_exe_aot_cli_check` `8.30s`, `cpu_stdio_exe_aot_check` `1.34s`) - `sccache`: 1/4 hits; wall `27.3s` AI-assisted; commands listed were executed locally.
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
R0Y00/Xbox2Windows!2659
No description provided.