← Back to Pull requests

[Clang][CMake] Support MinGW in CLANG_ENABLE_BOOTSTRAP #242849

Merged
EmilAskerov merged 1 files (16 lines) on Nov 19, 2026 07:13 UTC
View on GitHub
EmilAskerov EmilAskerov commented on Nov 15, 2026 16:58 UTC
Author

When bootstrapping Clang with a MinGW toolchain on Windows (WIN32 and MINGW are both true), clang/CMakeLists.txt currently assumes WIN32 implies an MSVC-like toolchain:

  • Use clang${CMAKE_EXECUTABLE_SUFFIX} and clang++${CMAKE_EXECUTABLE_SUFFIX} instead of clang-cl.exe when MINGW is set.

  • Extend the elseif(NOT WIN32) LTO archiver branch to elseif((NOT WIN32) OR MINGW) with ${CMAKE_EXECUTABLE_SUFFIX} (keeping LLVMgold restricted to NOT WIN32).

  • Restrict the lld-link CMAKE_LINKER override under BOOTSTRAP_LLVM_ENABLE_LLD to WIN32 AND NOT MINGW (or cross-compiling to Windows), since MinGW uses the GNU driver like Unix targets.
  • Tested locally on Windows with llvm-mingw (x86_64-w64-windows-gnu), CLANG_ENABLE_BOOTSTRAP=ON, BOOTSTRAP_LLVM_ENABLE_LLD=ON, and BOOTSTRAP_LLVM_ENABLE_LTO=Thin (stage2-configure and stage2 llvm-tblgen build succeed).

    Diff: 16 lines (+8 / -8) across 1 files Reviewer: mstorsjo Review duration: 5174m
    All Vouch review confidence checks passed
    Residual risk 0.02 = Change Risk (0.20) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.20 · 16 lines diff across 1 files
    0.20
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 5 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    90%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.170
    Real PR Conversation Timeline
    20 items
    github-actions[bot] github-actions[bot] commented on Nov 15, 2026 16:59 UTC
    Bot

    <!--LLVM NEW CONTRIBUTOR COMMENT-->

    Hello @EmilAskerov :wave:

    Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.

    All contributions to LLVM must follow our LLVM AI Tool Use Policy. In particular, if you used AI while working on this PR, remember to add a note to the PR description.
    The LLVM Code-Review Policy and Practices document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR.

  • Our LLVM Developer Policy describes our expectations for code quality, commit summaries and contains notes on our CI system.
  • Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description.

    ---

    Frequently asked questions

    How do I add reviewers?

    This PR will be automatically labeled, and the relevant teams will be notified. For some parts of the project, reviewers may also be added automatically.

    You can also add reviewers manually using the Reviewers section on this page. If you cannot use that section, it is probably because you do not have write permissions for the repository. In that case, you can request a review by tagging reviewers in a comment using @ followed by their GitHub username.

    What if there are no comments?

    If you have not received any comments on your PR after a week, you can request a review by pinging the PR with a comment such as “Ping”. The common courtesy ping rate is once a week. Please remember that you are asking for volunteer time from other developers.

    Are any special GitHub settings required to contribute to LLVM?

    We only require contributors to have a public email address associated with their GitHub commits, see this section of LLVM Developer Policy for details.

    ---

    If you have questions, feel free to leave a comment on this PR, or ask on LLVM Discord or LLVM Discourse.

    Thank you,
    The LLVM Community

    llvmorg-github-actions[bot] llvmorg-github-actions[bot] commented on Nov 15, 2026 16:59 UTC
    Bot

    <!--LLVM PR SUMMARY COMMENT-->

    @llvm/pr-subscribers-clang

    Author: Emil Askerov (EmilAskerov)

    <details>
    <summary>Changes</summary>

    When bootstrapping Clang with a MinGW toolchain on Windows (WIN32 and MINGW are both true), clang/CMakeLists.txt currently assumes WIN32 always implies an MSVC-like toolchain (clang-cl.exe, llvm-lib, lld-link.exe):

    1. Compiler selection: clang-cl.exe was selected for all WIN32 hosts, failing when building with a MinGW toolchain/sysroot. Select clang${CMAKE_EXECUTABLE_SUFFIX} / clang++${CMAKE_EXECUTABLE_SUFFIX} by default and reserve clang-cl.exe for WIN32 AND NOT MINGW.
    2. LTO archiver selection: The elseif(MSVC) / elseif(NOT WIN32) branches skipped MinGW entirely, leaving llvm-ar / llvm-ranlib unset and omitted from clang-bootstrap-deps. Add an elseif(MINGW) branch to depend on llvm-ar and llvm-ranlib and set CMAKE_AR / CMAKE_RANLIB with ${CMAKE_EXECUTABLE_SUFFIX}.
    3. LLD linker selection: BOOTSTRAP_LLVM_ENABLE_LLD forced lld-link.exe on all Windows hosts, which fails with GNU-driver flags passed by clang.exe on MinGW. Select ld.lld${CMAKE_EXECUTABLE_SUFFIX} when MINGW is set (and targeting Windows).

    Tested locally on Windows using llvm-mingw (x86_64-w64-windows-gnu) with:

  • CLANG_ENABLE_BOOTSTRAP=ON

  • BOOTSTRAP_LLVM_ENABLE_LLD=ON

  • BOOTSTRAP_LLVM_ENABLE_LTO=Thin
  • The stage2-configure target completed successfully.

    ---
    Full diff: https://github.com/llvm/llvm-project/pull/242849.diff

    1 Files Affected:

  • (modified) clang/CMakeLists.txt (+10-4)
  • ``````

    diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
    index fbb4cfaf09005..51e883d8eb972 100644
    --- a/clang/CMakeLists.txt
    +++ b/clang/CMakeLists.txt
    @@ -768,6 +768,10 @@ if (CLANG_ENABLE_BOOTSTRAP)
         elseif(MSVC)
           add_dependencies(clang-bootstrap-deps llvm-lib)
           set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib)
    +    elseif(MINGW)
    +      add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
    +      set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX})
    +      set(${CLANG_STAGE}_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX})
         elseif(NOT WIN32)
           add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
           if(NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR)
    @@ -833,9 +837,9 @@ if (CLANG_ENABLE_BOOTSTRAP)
         endif()
       endif()
     
    -  set(C_COMPILER "clang")
    -  set(CXX_COMPILER "clang++")
    -  if(WIN32)
    +  set(C_COMPILER "clang${CMAKE_EXECUTABLE_SUFFIX}")
    +  set(CXX_COMPILER "clang++${CMAKE_EXECUTABLE_SUFFIX}")
    +  if(WIN32 AND NOT MINGW)
         set(C_COMPILER "clang-cl.exe")
         set(CXX_COMPILER "clang-cl.exe")
       endif()
    @@ -849,7 +853,9 @@ if (CLANG_ENABLE_BOOTSTRAP)
       # cmake requires CMAKE_LINKER to be specified if the compiler is MSVC-like,
       # otherwise it defaults the linker to be link.exe.
       if(BOOTSTRAP_LLVM_ENABLE_LLD)
    -    if((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")
    +    if(MINGW AND (NOT BOOTSTRAP_CMAKE_SYSTEM_NAME OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows"))
    +      set(${CLANG_STAGE}_LINKER -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld${CMAKE_EXECUTABLE_SUFFIX})
    +    elseif((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")
           set(${CLANG_STAGE}_LINKER -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/lld-link${CMAKE_EXECUTABLE_SUFFIX})
         endif()
       endif()
    
    
    ``````

    </details>

    EmilAskerov EmilAskerov commented on Nov 15, 2026 17:02 UTC
    Author

    Hello @EmilAskerov 👋

    > Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.

    > All contributions to LLVM must follow our LLVM AI Tool Use Policy. In particular, if you used AI while working on this PR, remember to add a note to the PR description.

    The LLVM Code-Review Policy and Practices document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR.

    * Our LLVM Developer Policy describes our expectations for code quality, commit summaries and contains notes on our CI system.

    > Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description.

    > ### Frequently asked questions

    How do I add reviewers?

    > This PR will be automatically labeled, and the relevant teams will be notified. For some parts of the project, reviewers may also be added automatically.

    > You can also add reviewers manually using the Reviewers section on this page. If you cannot use that section, it is probably because you do not have write permissions for the repository. In that case, you can request a review by tagging reviewers in a comment using @ followed by their GitHub username.

    > What if there are no comments?

    > If you have not received any comments on your PR after a week, you can request a review by pinging the PR with a comment such as “Ping”. The common courtesy ping rate is once a week. Please remember that you are asking for volunteer time from other developers.

    > Are any special GitHub settings required to contribute to LLVM?

    > We only require contributors to have a public email address associated with their GitHub commits, see this section of LLVM Developer Policy for details.

    > If you have questions, feel free to leave a comment on this PR, or ask on LLVM Discord or LLVM Discourse.

    > Thank you, The LLVM Community

    I have read the LLVM AI Tool Use Policy, Code-Review Policy and Practices, and Developer Policy.

    EmilAskerov EmilAskerov commented on Nov 15, 2026 17:04 UTC
    Author

    @mstorsjo Could you please review the MinGW-specific CMake changes in this PR?

    EmilAskerov EmilAskerov commented on Nov 15, 2026 18:47 UTC
    Author

    Problem

    When configuring the Clang bootstrap on Windows with a MinGW toolchain, both WIN32 and MINGW are true. However, clang/CMakeLists.txt currently treats WIN32 as an indication that the host uses an MSVC-style toolchain.

    This causes several problems during Stage2 configuration:

  • Incorrect C and C++ compiler selection: The bootstrap configuration selects clang-cl.exe and uses the MSVC command-line interface instead of clang.exe and clang++.exe. As a result, GNU-style compiler flags such as -ffile-prefix-map are reported as unknown arguments and ignored.

  • Incorrect linker selection: When BOOTSTRAP_LLVM_ENABLE_LLD=ON, the configuration selects lld-link.exe instead of ld.lld.exe. CMake consequently invokes the MSVC-style vs_link_exe workflow, passing MSVC-specific linker arguments.

  • Incompatible linker flags: GNU-style linker flags, including -Wl,/Brepro and -flto=thin, are passed to lld-link.exe, which reports them as unknown arguments.

  • Missing MSVC libraries: The MSVC-style link command attempts to link against libraries such as kernel32.lib, user32.lib, msvcrtd.lib, and oldnames.lib. These libraries are not available in the MinGW environment, causing the link step to fail.

  • Missing MinGW LTO archiver configuration: The existing MSVC and NOT WIN32 branches do not cover the MinGW case. Consequently, llvm-ar and llvm-ranlib are not added to clang-bootstrap-deps or configured for the bootstrap stage.
  • The failure occurs during CMake's initial C compiler test (CMakeTestCCompiler.cmake), before the Stage2 build can be generated:

    The C compiler
      ".../build/bin/clang-cl.exe"
    is not able to compile a simple test program.
    
    lld-link: error: could not open 'kernel32.lib': No such file or directory
    lld-link: error: could not open 'user32.lib': No such file or directory
    lld-link: error: could not open 'msvcrtd.lib': No such file or directory
    

    Solution

    Handle MinGW explicitly in the bootstrap configuration:

  • Use clang.exe and clang++.exe for MinGW builds, while preserving clang-cl.exe for non-MinGW Windows builds.

  • Add a dedicated MinGW LTO archiver configuration using llvm-ar.exe and llvm-ranlib.exe.

  • Select ld.lld.exe for MinGW bootstrap builds targeting Windows, while retaining lld-link.exe for the existing MSVC configuration.
  • This allows the bootstrap configuration to use the appropriate GNU-style tools on MinGW without changing the existing MSVC behavior.

    mstorsjo mstorsjo commented on code on Nov 16, 2026 21:31 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -849,7 +853,9 @@ if (CLANG_ENABLE_BOOTSTRAP)
       # cmake requires CMAKE_LINKER to be specified if the compiler is MSVC-like,
       # otherwise it defaults the linker to be link.exe.
       if(BOOTSTRAP_LLVM_ENABLE_LLD)
    -    if((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")
    +    if(MINGW AND (NOT BOOTSTRAP_CMAKE_SYSTEM_NAME OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows"))
    +      set(${CLANG_STAGE}_LINKER -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld${CMAKE_EXECUTABLE_SUFFIX})

    I'm unsure about this part here. We don't set any -DCMAKE_LINKER= at all for other platforms, and the comment above says we only need to do this when the compiler is MSVC_like. So I would rather limit the existing conditional by adding an (MSVC AND ...()) to it, or ((NOT MINGW) AND (...)) or so. Otherwise I'd like to know why we should do this for mingw but not for unixy targets.

    mstorsjo mstorsjo commented on code on Nov 16, 2026 21:32 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -768,6 +768,10 @@ if (CLANG_ENABLE_BOOTSTRAP)
         elseif(MSVC)
           add_dependencies(clang-bootstrap-deps llvm-lib)
           set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib)
    +    elseif(MINGW)
    +      add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
    +      set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX})
    +      set(${CLANG_STAGE}_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX})
         elseif(NOT WIN32)

    Couldn't this be made into elseif((NOT WIN32) OR MINGW), if you'd add ${CMAKE_EXECUTABLE_SUFFIX} where needed?

    EmilAskerov EmilAskerov commented on code on Nov 17, 2026 20:22 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -849,7 +853,9 @@ if (CLANG_ENABLE_BOOTSTRAP)
       # cmake requires CMAKE_LINKER to be specified if the compiler is MSVC-like,
       # otherwise it defaults the linker to be link.exe.
       if(BOOTSTRAP_LLVM_ENABLE_LLD)
    -    if((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")
    +    if(MINGW AND (NOT BOOTSTRAP_CMAKE_SYSTEM_NAME OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows"))
    +      set(${CLANG_STAGE}_LINKER -DCMAKE_LINKER=${LLVM_RUNTIME_OUTPUT_INTDIR}/ld.lld${CMAKE_EXECUTABLE_SUFFIX})

    Good point, thank you! Updated to restrict the lld-link CMAKE_LINKER setting with NOT MINGW instead of setting ld.lld here, and verified locally that stage2 still configures and links with -fuse-ld=lld.

    EmilAskerov EmilAskerov commented on code on Nov 17, 2026 20:22 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -768,6 +768,10 @@ if (CLANG_ENABLE_BOOTSTRAP)
         elseif(MSVC)
           add_dependencies(clang-bootstrap-deps llvm-lib)
           set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib)
    +    elseif(MINGW)
    +      add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
    +      set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX})
    +      set(${CLANG_STAGE}_RANLIB -DCMAKE_RANLIB=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX})
         elseif(NOT WIN32)

    Done, combined into elseif((NOT WIN32) OR MINGW) with ${CMAKE_EXECUTABLE_SUFFIX}.

    mstorsjo mstorsjo commented on code on Nov 17, 2026 21:26 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -849,7 +849,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
       # cmake requires CMAKE_LINKER to be specified if the compiler is MSVC-like,
       # otherwise it defaults the linker to be link.exe.
       if(BOOTSTRAP_LLVM_ENABLE_LLD)
    -    if((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")
    +    if((WIN32 AND NOT MINGW AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")

    Won't the BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows" case hit on Windows too?

    mstorsjo mstorsjo commented on code on Nov 17, 2026 21:29 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -768,13 +768,13 @@ if (CLANG_ENABLE_BOOTSTRAP)
         elseif(MSVC)
           add_dependencies(clang-bootstrap-deps llvm-lib)
           set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib)
    -    elseif(NOT WIN32)
    +    elseif((NOT WIN32) OR MINGW)
           add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
    -      if(NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR)
    +      if(NOT WIN32 AND NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR)
             add_dependencies(clang-bootstrap-deps LLVMgold)

    I wonder if keeping this case would be benign? On the other hand, gold won't do much for windows anyway, so there's no need for keeping it either...

    EmilAskerov EmilAskerov commented on code on Nov 17, 2026 23:11 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -849,7 +849,7 @@ if (CLANG_ENABLE_BOOTSTRAP)
       # cmake requires CMAKE_LINKER to be specified if the compiler is MSVC-like,
       # otherwise it defaults the linker to be link.exe.
       if(BOOTSTRAP_LLVM_ENABLE_LLD)
    -    if((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")
    +    if((WIN32 AND NOT MINGW AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")

    Moved (NOT MINGW) outside to wrap both conditions: if((NOT MINGW) AND ((WIN32 AND NOT BOOTSTRAP_CMAKE_SYSTEM_NAME) OR BOOTSTRAP_CMAKE_SYSTEM_NAME STREQUAL "Windows")).

    EmilAskerov EmilAskerov commented on code on Nov 17, 2026 23:12 UTC
    Code Review
    clang/CMakeLists.txt:1
    @@ -768,13 +768,13 @@ if (CLANG_ENABLE_BOOTSTRAP)
         elseif(MSVC)
           add_dependencies(clang-bootstrap-deps llvm-lib)
           set(${CLANG_STAGE}_AR -DCMAKE_AR=${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib)
    -    elseif(NOT WIN32)
    +    elseif((NOT WIN32) OR MINGW)
           add_dependencies(clang-bootstrap-deps llvm-ar llvm-ranlib)
    -      if(NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR)
    +      if(NOT WIN32 AND NOT BOOTSTRAP_LLVM_ENABLE_LLD AND LLVM_BINUTILS_INCDIR)
             add_dependencies(clang-bootstrap-deps LLVMgold)

    Yes, LLVMgold isn't relevant on Windows/MinGW anyway, so guarding it with NOT WIN32 avoids pulling it in if LLVM_BINUTILS_INCDIR happens to be set.

    mstorsjo mstorsjo approved these changes on Nov 18, 2026 10:04 UTC
    Approved Reviewer

    LGTM

    I can merge this later today if nobody else objects (and if I remember - if not, remind me in a day or two).

    EmilAskerov EmilAskerov commented on Nov 18, 2026 10:30 UTC
    Author

    LGTM

    > I can merge this later today if nobody else objects (and if I remember - if not, remind me in a day or two).

    Thanks for the review and approval! I appreciate your help. I'll wait for the merge.

    mstorsjo mstorsjo commented on Nov 18, 2026 10:35 UTC
    Contributor

    Oh, also, for this to be mergeable: Please turn off Keep my email addresses private setting in your account. See LLVM Developer Policy and LLVM Discourse for more information.

    EmilAskerov EmilAskerov commented on Nov 18, 2026 10:56 UTC
    Author

    Oh, also, for this to be mergeable: Please turn off Keep my email addresses private setting in your account. See LLVM Developer Policy and LLVM Discourse for more information.

    I've turned off the Keep my email addresses private setting in my GitHub account. Thanks for letting me know!

    EmilAskerov EmilAskerov commented on Nov 19, 2026 07:11 UTC
    Author

    LGTM

    > I can merge this later today if nobody else objects (and if I remember - if not, remind me in a day or two).

    @mstorsjo just a quick remind regarding this PR. All checks are passed. Thanks again for the review!

    github-actions[bot] github-actions[bot] commented on Nov 19, 2026 07:14 UTC
    Bot

    <!--LLVM BUILDBOT INFORMATION COMMENT-->

    @EmilAskerov Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

    Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

    Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

    How to do this, and the rest of the post-merge process, is covered in detail here.

    If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

    If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

    Reviewers
    Assignees
    EmilAskerov EmilAskerov
    Labels
    risk: low confidence: 90.6% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 19.9% (LOW) · Higher = larger blast radius
    19.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 90.6% · Lower = rushed or shallow review
    90.6%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 2% · Safe to merge
    2%