[llvm] 13391ce - On Windows, in the release build script, fix detecting if clang-cl is in PATH (#149597)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 06:13:55 PDT 2025


Author: Alexandre Ganea
Date: 2025-08-19T13:13:51Z
New Revision: 13391ce183fc0b4c326829caad3eaec847c7b255

URL: https://github.com/llvm/llvm-project/commit/13391ce183fc0b4c326829caad3eaec847c7b255
DIFF: https://github.com/llvm/llvm-project/commit/13391ce183fc0b4c326829caad3eaec847c7b255.diff

LOG: On Windows, in the release build script, fix detecting if clang-cl is in PATH (#149597)

The checks for detecting if `clang-cl` and `lld-link` are in `%PATH`
were wrong.

This fixes the comment in
https://github.com/llvm/llvm-project/pull/135446#discussion_r2215511129

Added: 
    

Modified: 
    llvm/utils/release/build_llvm_release.bat

Removed: 
    


################################################################################
diff  --git a/llvm/utils/release/build_llvm_release.bat b/llvm/utils/release/build_llvm_release.bat
index 3042fc2d77dd1..54645d0c6369f 100755
--- a/llvm/utils/release/build_llvm_release.bat
+++ b/llvm/utils/release/build_llvm_release.bat
@@ -169,9 +169,9 @@ set common_cmake_flags=^
 
 if "%force-msvc%" == "" (
   where /q clang-cl
-  if errorlevel 0 (
+  if %errorlevel% EQU 0 (
     where /q lld-link
-    if errorlevel 0 (
+    if %errorlevel% EQU 0 (
       set common_compiler_flags=%common_compiler_flags% -fuse-ld=lld
       
       set common_cmake_flags=%common_cmake_flags%^


        


More information about the llvm-commits mailing list