[libclc] 754ebc6 - [NFC][libclc] Add missing evaluation for variable ${tool}_target (#163540)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 15 18:40:13 PDT 2025


Author: Wenju He
Date: 2025-10-16T09:40:09+08:00
New Revision: 754ebc6ebb9fb9fbee7aef33478c74ea74949853

URL: https://github.com/llvm/llvm-project/commit/754ebc6ebb9fb9fbee7aef33478c74ea74949853
DIFF: https://github.com/llvm/llvm-project/commit/754ebc6ebb9fb9fbee7aef33478c74ea74949853.diff

LOG: [NFC][libclc] Add missing evaluation for variable ${tool}_target (#163540)

The variabls should be evaluated before checking for empty.

Added: 
    

Modified: 
    libclc/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index ba0fc4b38ce81..088edc06d23d3 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -124,7 +124,7 @@ if( EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
 endif()
 
 foreach( tool IN ITEMS clang opt llvm-as llvm-link )
-  if( NOT EXISTS "${${tool}_exe}" AND "${tool}_target" STREQUAL "" )
+  if( NOT EXISTS "${${tool}_exe}" AND "${${tool}_target}" STREQUAL "" )
     message( FATAL_ERROR "libclc toolchain incomplete - missing tool ${tool}!" )
   endif()
 endforeach()


        


More information about the cfe-commits mailing list