Skip to content

2026.10.5.3: MSVC's x86 spelling, one answer to 32-bit x86, windres recognition and the manifest resource's command - #777

Merged
Sunrisepeak merged 3 commits into
mainfrom
release/2026.10.5.3
Oct 6, 2026
Merged

Sunrisepeak merged 3 commits into
mainfrom
release/2026.10.5.3

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Release 2026.10.5.3. It ships the fix of #775 (#776) and the follow-ups of that PR's review:

  • x86 is the i686 target. triple::parse writes MSVC's x86 as i686, as it writes amd64 and arm64. Before, [target.x86-windows-msvc] reached clang and llvm-windres as x86-pc-windows-msvc, and both refuse it (unknown target triple). SPEC-004 1.13 §4.6 states the equal spellings.
  • One answer to "is this 32-bit x86". Triple::is_x86_32 and Triple::msvc_arch replace six local checks, which used four different sets. i386 to i586 selected the x64 MSVC toolset and redist directories, and PE export discovery did not treat them as 32-bit x86. The 32-bit host_arch is spelled i686.
  • LLVM's windres is recognised where it is found. find_rc_tool sets RcTool::llvm from the tool's name, or from the name of the file its symlink resolves to. The use site no longer reads the file name.
  • Every reader of a [target.<triple>] row finds it by any spelling. I found this in self-review. find_target_entry moves to mcpp.build.prepare_inputs and is exported. The runner and min_api_level readers used an exact key and now use it.
  • The build program's manifest resource keeps its command. The argv is written beside the object and compared like the two inputs.

Design: .agents/docs/2026-10-06-windows-x86-arch-vocabulary-and-rc-follow-ups-design.md

Criteria

  • Unit: TripleVocabulary.MsvcsX86IsWrittenI686AndTheOtherSpellingsKeepTheirMeaning, TripleVocabulary.The32BitX86QuestionHasOneAnswer, BuildResources.LlvmWindresIsRecognisedThroughTheSymlinkThatNamesIt, BuildResources.TheManifestObjectIsRemadeWhenItsCommandChanges, TargetRowSpelling.EverySpellingOfATripleFindsItsRow, and the i386/i586 rows of MsvcCompilerVersion and MsvcRedist. Local Linux run: mcpp test 147 passed, plus -p toolchain-model and -p platform.
  • E2E 889 adds the x86-windows-msvc spelling (C++ EXE with a resource; PE machine 332; the program runs). On 2026.10.5.2 that case fails at its first compile, because clang refuses x86-pc-windows-msvc.
  • Related Linux e2e tests passed locally with the fresh binary: 105, 112, 198, 199, 247, 643, 837, 30, and the runner tests 330, 339, 656, 672, 674, 745. 650, 653 and 657 need node, which is not installed on this machine; they fail the same way with 2026.10.5.2.

Compatibility

  • No manifest migration is required. A section written [target.x86-…] now matches --target i686-…, and the reverse.
  • Native builds that do not name a target produce the same commands.
  • The manifest resource of an existing build program is compiled once more, the first time its command is recorded.

…ecognition and the manifest resource's command

- triple::parse writes MSVC's `x86` as `i686`, as `amd64` and `arm64` are written; `[target.x86-windows-msvc]` and `--target x86-windows-msvc` are the i686 row and reach clang and llvm-windres as `i686-pc-windows-msvc` (SPEC-004 1.13 §4.6).
- Triple::is_x86_32 and Triple::msvc_arch answer the 32-bit x86 question for the NASM format, the windres COFF target, the MSVC toolset and redist directories, the ABI tool environment and PE export discovery; i386-i586 no longer select the x64 MSVC directory. The 32-bit host_arch is spelled `i686`.
- RcTool::llvm is decided by find_rc_tool (is_llvm_windres: the name, or the file a symlink resolves to), so llvm-mingw's `<triple>-windres` receives a triple.
- The build program's UTF-8 manifest resource keeps its command beside the object and is compiled again when it changes.
- E2E 889 builds the `x86` spelling; unit tests for the vocabulary, the MSVC arch mapping, windres recognition and the manifest command.
- Docs 04/21 in both languages, SPEC-004 1.13, CHANGELOG (including #776).

Design: .agents/docs/2026-10-06-windows-x86-arch-vocabulary-and-rc-follow-ups-design.md
…ling

find_target_entry moves to mcpp.build.prepare_inputs and is exported; the
runner readers (the prepare conflict check, choose_device_action) and the
min_api_level readers use it instead of an exact key, so a section written
[target.x86-windows-msvc] supplies its runner as it supplies its toolchain.
Unit test TargetRowSpelling.
@Sunrisepeak
Sunrisepeak merged commit de9c290 into main Oct 6, 2026
51 checks passed
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.

1 participant