[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 27 11:04:34 PDT 2025
BukeBeyond wrote:
The following code breaks builds on Windows:
compiler-rt/cmake/Modules/CompilerRTUtils.cmake:387
runtimes/CMakeLists.txt:197
```
if (CMAKE_C_SIMULATE_ID MATCHES "MSVC")
set(option_prefix "/clang:")
endif()
```
The problem is when LLVM is built with Clang-cl, CMAKE_C_SIMULATE_ID gets MSVC. But these sub builds switch the compiler to the newly built clang++ without updating CMAKE_C_SIMULATE_ID, and this condition sets an invalid flag "/clang:".
https://github.com/llvm/llvm-project/pull/89425
More information about the cfe-commits
mailing list