Repository navigation
build_llvm_mc: install llvm-mc outside AppData, where the install manager's python can see it - #1233
Conversation
…ager's python can see it python from the Python install manager (the WindowsApps alias) doesn't see folders other programs create under %LOCALAPPDATA% or %APPDATA%, so the old default made make_game.py report llvm-mc missing and the fuzzers stop with WinError 2 although LLVM_MC named the file. The default -Dest is now %USERPROFILE%\.leonida\llvm-mc, and the preflight explains an LLVM_MC that points into AppData.
|
Tested 3420289 on Windows 11 (Python 3.12, not the install-manager
|
whattheflop
left a comment
There was a problem hiding this comment.
AI-assisted independent review on Windows 11 build 26200 with uv-managed CPython 3.12.13, comparing 342028959a5fae2f88c1b5daba8067152241c366 with its direct parent 0d61c357656d92334eef97facec1ae4f7b2b60b1.
PowerShell parsed the checked-in script at each commit. Evaluating only the -Dest default expression confirmed %USERPROFILE%\.leonida\llvm-mc at head and %LOCALAPPDATA%\Leonida\llvm-mc at the parent.
I passed LLVM_MC through the real command parser, file lookup and shader preflight. Only unrelated SPIR-V and work-directory checks were stubbed in-process.
- At head, the absent old-default path under the actual
%LOCALAPPDATA%got the Local hint. A quoted missing path with spaces under the actual%APPDATA%got the Roaming hint. The similarly namedAppData\LocalToolssibling and the missing executable at the new default got the generic message. The parent gave the generic message in all four cases. - The existing uv
python.exeunder%APPDATA%served as an executable-availability stand-in. It passed preflight with no hint and ran--versionon both revisions. The documentedwsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mcroute also passed without a hint and returned LLVM 21.1.8 withamdgcnon both.
This checks visibility from the directly launched uv interpreter and the hint's boundaries. The Python install-manager alias behavior is covered by the author's separate 3.14.7 measurement. No LLVM install, game files, or GPU needed. No actionable findings.
Item: new BUILD item, claimed in #1218 (claim); no ID yet.
scripts/build_llvm_mc.ps1installedllvm-mc.exeto%LOCALAPPDATA%\Leonida\llvm-mcby default.pythonfrom the Python install manager (python.org's default Windows installer for 3.14; the app execution alias inWindowsApps) doesn't see folders that other programs create under%LOCALAPPDATA%or%APPDATA%. So withLLVM_MCset correctly,python -I make_game.py ...(as in the README) reports llvm-mc missing, andvalu_fuzz.py/lds_fuzz.pystop withFileNotFoundError: [WinError 2]at the assembler call.Build.batisn't affected, because it triespyfirst.Measured
Windows 11 26200, Python 3.14.7, PythonManager package 26.4.240.0. A folder created today under
%LOCALAPPDATA%or%APPDATA%:os.path.existson the new folderpython(the alias inWindowsApps)pythoncore-3.14-64\python.exeby full pathpyFolders that already existed (
Temp,Microsoft) are visible in all three; a new folder under%USERPROFILE%or on another drive is too.Changes
scripts/build_llvm_mc.ps1: the default-Destis%USERPROFILE%\.leonida\llvm-mc, with a comment on why it isn't in AppData.make_game.py: when llvm-mc is missing andLLVM_MCpoints into%LOCALAPPDATA%or%APPDATA%(Windows only), the preflight line says why and what to do (appdata_hint). People who already built llvm-mc with the old default get this hint.docs/design.md("Disassembling shaders"): the new default and the reason.tests/test_make_game_preflight.py:appdata_hintfor both variables, paths with other case and quotes, paths outside AppData (includingLocalLow, a WSL command and the new default), off Windows, and the preflight message.Touches the same script as BUILD-139 (@stayjuced, the cleanup at the end of the script), but different lines.
Tested
Windows 11 Pro 26200, RTX 3080 (driver 621.14), Python 3.14.7 (install manager):
tests/test_make_game_preflight.py: 58 tests pass under bothpythonandpy;test_make_game_pipeline_preflight,test_mc_command,test_make_game_argparseandtest_make_game_platformpass;python -m compileall -q make_game.py tools testsis clean.LLVM_MCat the old default:tool_availableis False underpythonand the hint is shown. WithLLVM_MCat the new default: True, no hint, andvalu_fuzz.py --family mem --programs 2runs (2/2 match) under the samepython.C:\Users\<user>\.leonida\llvm-mc(read from the script's param block). I didn't rerun the whole 20-40 minute LLVM build for this change; nothing else in the script changed.No game files involved. AI-assisted (Claude Code).