Find Visual Studio Preview when building llvm-mc (BUILD-LLVM-MC-PREVIEW-FALLBACK) #2053

Closed
alexandersato0830 wants to merge 1 commit from upstream-pr/2053 into main
alexandersato0830 commented 2026-11-25 19:05:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by alexandersato0830 on 2026-11-25T19:05:15Z.


Claimed in the coordination issue as: BUILD-LLVM-MC-PREVIEW-FALLBACK

Depends on: #1871 and #2066 (overlapping LLVM discovery edits. #2066 also covers three other entry points).

What and why

On a Windows machine with only Visual Studio Preview, the LLVM build script exits before building because the default vswhere query excludes prereleases. Retry with -prerelease only when the stable query returns no installation. The existing stable toolchain remains preferred, and the same error is shown if neither query finds a match. Original reproduction · Microsoft vswhere documentation

Tested

  • On Windows 11 with Windows PowerShell 5.1, executed the script's discovery block with a controlled vswhere stub for four cases: stable only, stable and Preview, Preview only, and neither. Main 9f9a7c5 failed the Preview-only case. All four passed with the fix, including stable preference and the unchanged no-toolchain error.
  • py -3.14 -I tests/test_build_percent_path.py and py -3.14 -I tests/test_build_batch_launch.py passed (5 tests).
  • Verified git diff --check and the source-only check. This host has stable Visual Studio, so the Preview path was tested with the stub.

GPUs tested: n/a.

AI-assisted: yes.

  • Based on current main.
  • One topic.
  • Source-only change.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5497430673 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2053). Originally posted by [alexandersato0830](https://github.com/alexandersato0830) on 2026-11-25T19:05:15Z. --- Claimed in the coordination issue as: [BUILD-LLVM-MC-PREVIEW-FALLBACK](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171767396) Depends on: #1871 and #2066 (overlapping LLVM discovery edits. #2066 also covers three other entry points). ### What and why On a Windows machine with only Visual Studio Preview, the LLVM build script exits before building because the default `vswhere` query excludes prereleases. Retry with `-prerelease` only when the stable query returns no installation. The existing stable toolchain remains preferred, and the same error is shown if neither query finds a match. [Original reproduction](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7171221172) · [Microsoft vswhere documentation](https://github.com/microsoft/vswhere#readme) ### Tested - On Windows 11 with Windows PowerShell 5.1, executed the script's discovery block with a controlled `vswhere` stub for four cases: stable only, stable and Preview, Preview only, and neither. Main `9f9a7c5` failed the Preview-only case. All four passed with the fix, including stable preference and the unchanged no-toolchain error. - `py -3.14 -I tests/test_build_percent_path.py` and `py -3.14 -I tests/test_build_batch_launch.py` passed (5 tests). - Verified `git diff --check` and the source-only check. This host has stable Visual Studio, so the Preview path was tested with the stub. GPUs tested: n/a. AI-assisted: yes. - [x] Based on current `main`. - [x] One topic. - [x] Source-only change.
TheGeogeo commented 2026-11-28 22:16:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-28T22:16:51Z.


Duplicate check (diff reading only, no build): covered by #2066. #2066 adds the same -prerelease fallback to scripts/build_llvm_mc.ps1 and also to make_game.py, scripts/build_runtime.ps1 and tools/hw_oracle/runner.py, with tests that fail without it. Suggest closing this one in favour of #2066.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246624378 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2053#issuecomment-7246624378). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-28T22:16:51Z. --- Duplicate check (diff reading only, no build): covered by #2066. #2066 adds the same `-prerelease` fallback to `scripts/build_llvm_mc.ps1` and also to `make_game.py`, `scripts/build_runtime.ps1` and `tools/hw_oracle/runner.py`, with tests that fail without it. Suggest closing this one in favour of #2066. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 12:54:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T12:54:09Z.


Closing as a duplicate of #2066: this is its three-line subset for build_llvm_mc.ps1, and #2066 covers the other entry points too. Thanks!

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256144917 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2053#issuecomment-7256144917). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T12:54:09Z. --- Closing as a duplicate of #2066: this is its three-line subset for build_llvm_mc.ps1, and #2066 covers the other entry points too. Thanks!

Pull request closed

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
ProjectLeonida/mandy!2053
No description provided.