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

Open
github-bot wants to merge 1 commit from github-bot/gh-2053 into main AGit
Owner

@⁠alexandersato0830 on GitHub · 2026-11-25 19:05 UTC · original
alexandersato0830:codex/vswhere-preview-fallback → main · +3 −0 · 1 files · 1 commits · open

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.
**@⁠alexandersato0830** on GitHub · 2026-11-25 19:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2053) `alexandersato0830:codex/vswhere-preview-fallback` → `main` · +3 −0 · 1 files · 1 commits · open Claimed in the coordination issue as: [BUILD-LLVM-MC-PREVIEW-FALLBACK](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) 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://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) · [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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:11 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2053/head:github-bot/gh-2053'
git switch 'github-bot/gh-2053'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2053'
git switch 'github-bot/gh-2053'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2053'
git switch 'github-bot/gh-2053'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2053'
git switch 'main'
git merge --squash 'github-bot/gh-2053'
git switch 'main'
git merge --ff-only 'github-bot/gh-2053'
git switch 'main'
git merge 'github-bot/gh-2053'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.