Skip to content

consumer-setup: upstream llvm msvc_link_lib_env (LIB on MSVC link actions), bump and drop the patch (part of #11411) #11967

Closed

Description

@TrapsterDK

Part of #11411 and #11416. The #11411 first slice replaces patches/rules_rust/rust_lld_msvc_libpath.patch with patches/llvm/msvc_link_lib_env.patch. That patch makes llvm's clang-cl toolchain set LIB on MSVC link actions to the hermetic CRT, Windows SDK and libc++ dirs. Unpatched rules_rust 0.75.0 already turns cc link env LIB into -LIBPATH: (rust/private/rustc.bzl get_linker_and_args, bazelbuild/rules_rust#3256), so rust-lld finds kernel32.lib. Consumers get unpatched BCR llvm, so the patch has to go upstream.

Where

  • patches/llvm/msvc_link_lib_env.patch, MODULE.bazel llvm single_version_override, patches/README.md llvm rows
  • cli/adopt/src/overrides.rs llvm entry, families/{jvm,beam}/third_party/rules_dx/

Fix

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hwH5AS7ytCaBAYwEtU

Activity

  1. added
    P2
    model:sonnet
    on Nov 11, 2026
  2. TrapsterDK commented on Nov 12, 2026

    @TrapsterDK
    CollaboratorAuthor

    Not started. Blocked: the Fix items need a hermetic-llvm PR and a BCR llvm release, both outside devhusdk/rules_dx, and patches/llvm/msvc_link_lib_env.patch is not on main yet (only libunwind_copy and clang_cl_crt_default_lib are). Remaining: every Fix item. Next worker: land the patch content, open the upstream PR, then bump and drop once released.

  3. TrapsterDK commented on Nov 17, 2026

    @TrapsterDK
    CollaboratorAuthor

    Skipped: #12667 replaced the llvm patch with rules_dx clang-cl toolchains (//cc/private/toolchain/clang_cl). What remains is opening the hermetic-llvm PR (outside devhusdk/rules_dx), which needs the owner or an authorized account, and then the BCR bump that drops the //cc/private/toolchain/clang_cl LIB cc_args.

    Assisted by Claude.

  4. TrapsterDK commented on Nov 18, 2026

    @TrapsterDK
    CollaboratorAuthor

    Upstream opened: hermeticbuild/hermetic-llvm issue hermeticbuild/hermetic-llvm#972, PR hermeticbuild/hermetic-llvm#973. The clang-cl MSVC toolchain sets LIB on link actions to the hermetic SDK, CRT and libc++ dirs, in place of the placeholder. The PR is rebased onto current llvm main and carries two analysis tests.

    Assisted by Claude.

  5. TrapsterDK commented on Nov 19, 2026

    @TrapsterDK
    CollaboratorAuthor

    Part done in #13976: the clang_cl LIB carry is marked # Upstream: hermeticbuild/hermetic-llvm#973, and the weekly //patches:upstream report now reads such markers. Remaining: wait for hermeticbuild/hermetic-llvm#973 to merge and ship in an llvm release, then bump llvm and delete the search_path, *_link_lib_env and link_lib_env targets in cc/private/toolchain/clang_cl/BUILD.bazel and the link_lib_env parameter of clang_cl_toolchains.

    Assisted by Claude.

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

    P2model:sonnet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions