[libclc] [libclc][CMake] Allow empty CMAKE_C_COMPILER_ID when CMAKE_C_COMPILER_WORKS is set (PR #186717)

Wenju He via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 12 17:52:06 PDT 2026


================
@@ -24,7 +24,21 @@ if(NOT CMAKE_CLC_COMPILER)
     message(FATAL_ERROR "The CLC language requires Clang. ${reason}.")
   endif()
 
-  set(CMAKE_CLC_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "CLC compiler")
+  # Use the regular clang driver if the C compiler is clang-cl.
+  if(CMAKE_C_COMPILER_ID STREQUAL "Clang" AND CMAKE_C_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
----------------
wenju-he wrote:

> I'm not sure what windows or clang-cl has to do with anything. There aren't any host side components built anymore here?

windows or clang-cl check is reverted in https://github.com/llvm/llvm-project/pull/191745. Yes, there is no host side component anymore

https://github.com/llvm/llvm-project/pull/186717


More information about the cfe-commits mailing list