Skip to content

Windows: the pinned seed's LLVM SDK needs VS 2026 Build Tools; with VS 2022 the stage1 link fails on 14 undefined __std_* STL helpers, and the requirement isn't documented #1886

Closed

Description

@joshhickson

The pinned windows-x86_64 seed's release, nightly-20260926-local-1-2e8defaa18ef (#1805), ships
with-llvm-sdk-22.1.6-windows-x86_64.tar.gz (sha256 8eb0ec5d…e945). Its provenance says it was built on "Windows 10
22H2, VS 2026 Build Tools".

With that SDK in .deps/llvm-22.1.6-windows-x86_64-msvc, src/main build :dev on main 355c20b1 fails to link stage1.
The host has VS 2022 Build Tools 17.14 (MSVC 14.44.35207), the only toolset installed:

lld-link: error: undefined symbol: __std_rotate
>>> referenced by clangIndex.lib(CommentToXML.cpp.obj):(void __cdecl std::_Buffered_inplace_merge_divide_and_conquer<...>)
...

Fourteen symbols are undefined in all:

__std_find_first_not_of_trivial_pos_1  __std_find_last_not_ch_pos_1  __std_find_not_ch_1
__std_is_sorted_until_4u  __std_max_element_1u  __std_max_element_4u  __std_max_element_8u
__std_min_element_4u  __std_min_element_f_  __std_minmax_element_8u  __std_rotate
__std_unique_2  __std_unique_4  __std_unique_8

These are the MSVC STL's vectorized algorithm helpers. The SDK's static libraries were compiled against the newer STL
headers, so linking them needs that toolset's libraries or later. The same tree links stage1 with the older
nightly-20260907-34132069721-1-8a729db8d01f SDK, and the build layer copes with that SDK's missing WebAssembly
backend.

Nothing in the repo states the minimum Visual Studio or MSVC for building on Windows. I searched docs/ and the
workflows for "VS 2026", "14.50" and "Build Tools 2026".

Expected: the minimum toolset for the pinned Windows SDK is documented (for example in
docs/spec/toolchain/with-bootstrap-runbook.md), or it's checked up front with a message that names it, instead of
14 undefined symbols at the end of the stage1 link.

Workaround: install VS 2026 Build Tools, or build with the nightly-20260907 SDK.

Side note: the build layer's fallback library paths (build/compiler.w:106-116, build/emit_c.w:161-190,
src/compiler/Link.w:645-647) name VS 2019 BuildTools MSVC 14.29.30133 and Windows Kit 10.0.19041.0. On a host
with neither installed, and with none of the WITH_WINDOWS_* variables set, stage1 still links: lld-link finds
the installed toolset. So those defaults are stale but harmless. The WITH_WINDOWS_* variables aren't documented
either.

Activity

  1. ehartford commented on Oct 3, 2026

    @ehartford
    Contributor

    Moot under D81 (#1915): the issue is about the then-pinned Windows seed nightly-20260926-local-1-2e8defaa18ef, whose LLVM SDK was built with VS 2026 Build Tools and needed matching MSVC STL helpers at link. seed.lock now pins windows-x86_64 to nightly-20260930-local-2-bd6e00d1dee6 (#1937): the self-contained Windows compiler carries its own linker, mingw-w64 UCRT runtime and libc++ (windows-gnu); no Visual Studio or Windows SDK is involved at all. Verified on win10 2026-10-02: a fresh clone with no HOME, no LLVM_PREFIX and no SDK ran :seed, :deps and build green (#1937), and the platform verification of #1267 rebuilt the compiler there with no MSVC toolset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions