Commit Graph

9 Commits

Author SHA1 Message Date
db44a3d32d Document Windows LLVM_MC argument quoting 2026-11-22 22:09:27 +01:00
6566ed3425 Preserve literal quotes in LLVM command arguments 2026-11-22 21:31:21 +01:00
5f7961631c fix(build): keep quoted values in Windows LLVM options
An option with a quoted path containing spaces was split into two arguments before llvm-mc could assemble the shader.
2026-11-22 18:42:18 +01:00
aa41f3d500 mc_command: name --llvm-mc only for the tool that has it; one import in crosslane_fuzz
Review on #1249: the message offered '(or --llvm-mc)' in every tool, but
only run_gpu_tests.py has that option. run()/not_found() take the tool's
option name, and run_gpu_tests.py passes it. crosslane_fuzz.py imports
mc_command once at module level instead of in two functions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:15:13 -06:00
e63bf6bdef mc_command.run: a missing llvm-mc is one line, not a FileNotFoundError traceback
Without llvm-mc, run_gpu_tests.py, valu_fuzz.py, lds_fuzz.py,
image_fuzz.py, crosslane_fuzz.py and runtime/test/shaders/build.py
ended in 'FileNotFoundError: [WinError 2]' from subprocess.run: the first
step of TEST-71 on a Windows machine without one. Only shader_disasm.py
said what was missing. mc_command.run() starts an llvm-mc command and
turns a command that can't be started into shader_disasm.py's message
(set LLVM_MC or --llvm-mc, build_llvm_mc.ps1, the WSL form); the six
llvm-mc call sites use it. tests/test_mc_command.py covers run() and
each tool with a nonexistent LLVM_MC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:02:20 -06:00
49db06af8a mc_command: an LLVM_MC path with spaces and no .exe stays one executable
On Windows, LLVM_MC=C:\Program Files\LLVM\bin\llvm-mc is no file under that
exact name, so split_command cut it at the space and every GPU tool tried to
run C:\Program. The same path without spaces worked, because Windows appends
.exe. A value with a directory part that shutil.which resolves is now kept
whole. Command lines and bare names are handled as before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RcPmkK8w6mToPwmoiLYPZt
2026-11-22 08:44:37 +01:00
d3cd5fbd8f BUILD: report a malformed LLVM_MC without an import-time traceback
(cherry picked from commit 6caeded81788e10c1f0bda7714d954e0ddff5335)
2026-11-22 00:33:49 -05:00
60703f5779 fix(tools): add future annotations for Python 3.9 compatibility in tools 2026-11-22 00:38:25 +01:00
66a410edf0 Accept LLVM_MC as a whole command in the tests and GPU tools
LLVM_MC may be one executable or a command line such as the WSL llvm-mc documented for Windows. shader_disasm.py already split it, but the tests, runtime/test/shaders/build.py and scripts/run_gpu_tests.py treated it as a single executable, so the documented setup skipped translator tests, and build.py passed a Windows path to WSL. Share the splitter in tools/mc_command.py and feed assembly on stdin.
2026-11-21 21:00:03 +00:00