[libclc] [llvm] [libclc][CMake] Use clang/llvm-ar on Windows (PR #186726)
Romaric Jodin via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 20 07:58:28 PDT 2026
rjodinchr wrote:
> If you're using add_subdirectory that's a direct violation of how the runtimes builds are supposed to be used so I'm not surprised it breaks.
I am not aware of that, could you please link to where this is mentioned?
> Thinking on this a bit more, I suppose this is the tension between 'standalone' builds? That still technically works but it requires you to set the compiler manually. Broadly LLVM has been moving away from 'standalone' builds. I don't think there are many left now.
That's not my understanding. I think standalone builds consist into building a llvm project on its own, not from llvm top-level CMake.
That's not what clspv is doing. clspv is building llvm from llvm top-level CMake file. Just it is part of something bigger, thus it is pulled as a subdirectory.
> You could possibly try defining CMAKE_CLC_COMPILER yourself, but it would need to be present before your root CMake invocation.
This is not working because CMake would use MSVC to make the static library.
https://github.com/llvm/llvm-project/pull/186726
More information about the cfe-commits
mailing list