Skip to content

Use PowerShell syntax for WSL llvm-mc setup - #4267

Open
TG0000 wants to merge 2 commits into
ItsNotRexed:mainfrom
TG0000:docs/powershell-wsl-llvm-mc
Open

TG0000 wants to merge 2 commits into
ItsNotRexed:mainfrom
TG0000:docs/powershell-wsl-llvm-mc

Conversation

@TG0000

@TG0000 TG0000 commented Nov 23, 2026 •

Copy link
Copy Markdown

What and why

The WSL setup used Unix-style assignments in four Windows guides and in the llvm-mc error messages. PowerShell treats them as commands and raises CommandNotFoundException. The README, GPU testing guide, Japanese and Simplified Chinese quickstarts, and affected diagnostics now show a copyable PowerShell assignment. The diagnostics reuse one example across the main preflight, the shared launcher, and the disassembler probe.

Claim: #4084 (comment)

Tested

  • Windows 11, PowerShell 7.6.9 and Windows PowerShell 5.1, CPython 3.12.10. Each old guide example failed in 7.6.9. Each corrected example passed the full five-argument command through the environment to Python on both shells.
  • Four focused assertions reproduced the broken hints before the code change and passed after it. 113 tests passed across the documentation, LLVM command, disassembler, and platform/preflight suites. Compileall and git diff --check passed.
  • WSL execution was outside this syntax check. No GPU or game files were used.

The README edit is adjacent to #4226. The two tips conflict in a test merge, so whichever lands second will need the README hunk rebased.

AI-assisted (OpenAI Codex).

@ray3242

ray3242 commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

The same bare LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc example is still printed by the tools themselves, in the error a Windows user sees when llvm-mc is missing or has no AMDGPU target (the messages point to scripts\build_llvm_mc.ps1, so they're aimed at Windows):

  • tools/mc_command.py:60, in not_found(), which every mc_command.run() caller ends with
  • tools/shader_disasm.py:60 and :67, the "could not be started" and "did not disassemble an s_endpgm" messages

Pasted into PowerShell or cmd, it fails the same way the docs line did. docs/design.md:480 and the mc_command.py docstring use cmd's set LLVM_MC=..., which works in cmd, so those are fine. No test asserts the hint's text, so changing it to the $env:LLVM_MC = '...' form (or showing both) breaks nothing.

Also, a heads-up: this branch and bobcatchris's #4226 (where → where.exe) edit the same README paragraph and don't merge cleanly. The resolution is trivial, but whichever lands second needs a rebase.

Read on 7386f65f; no Windows run. AI-assisted (Devin).

@Kam471 Kam471 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.

Ran this at 7386f65f on Windows 11: test_docs_links.py 6 OK, test_docs_list_items.py 2 OK; git diff --check clean.

The WSL LLVM_MC setup now uses PowerShell syntax and where.exe, consistent with the README change. No blocking issue.

@TG0000

TG0000 commented Nov 23, 2026

Copy link
Copy Markdown
Author

Addressed the diagnostics in a0969b0d. The shared launcher, both disassembler startup failures, and the make_game.py preflight now show the PowerShell form. Four focused assertions failed on the old messages and passed with the change. The PR description records the README rebase with #4226.

@TG0000 TG0000 changed the title Docs: use PowerShell syntax for WSL llvm-mc setup Use PowerShell syntax for WSL llvm-mc setup Nov 23, 2026

@Flyander Flyander 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.

The PowerShell example now uses PowerShell's environment-variable syntax consistently across the README, quickstarts, docs and runtime error messages. The helper centralizes the displayed command and the associated tests assert it. No blocking issue found.

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.

4 participants