[libcxx-commits] [libcxx] [libcxx]CMake Condition for Clang with MSVC frontend being incorrect (PR #194258)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 26 12:53:19 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: cqwrteur (trcrsired)
<details>
<summary>Changes</summary>
Try to deal with issue #<!-- -->190257
The code assumes CMAKE_CXX_SIMULATE_ID begin always clang-cl which is untrue because we can use clang --target=${cpu}-windows-msvc.
---
Full diff: https://github.com/llvm/llvm-project/pull/194258.diff
1 Files Affected:
- (modified) libcxx/CMakeLists.txt (+1-1)
``````````diff
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 845240d1b894c..8562fa9f90ae2 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -35,7 +35,7 @@ MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
"${PROJECT_NAME} requires an out of source build. Please create a separate
build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
)
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC")
message(STATUS "Configuring for clang-cl")
set(LIBCXX_TARGETING_CLANG_CL ON)
endif()
``````````
</details>
https://github.com/llvm/llvm-project/pull/194258
More information about the libcxx-commits
mailing list