Issue |
139843
|
Summary |
Cannot build LLVM with clang on Windows
|
Labels |
platform:windows
|
Assignees |
|
Reporter |
slydiman
|
The system is Windows x64 with MSVC installed.
It is necessary to build LLVM (clang, lld, etc.) with clang and run the test suite.
I have successfully built entire LLVM including clang with MSVC.
Then I'm trying to build a copy of LLVM with this clang.
```
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DLLVM_ENABLE_PROJECTS=llvm;lld;clang; ...
```
I got bin/c-index-test.exe linking errors:
```
lld-link: error: duplicate symbol: public: …
>>> defined at clangAST.lib(AttrImpl.cpp.obj)
>>> defined at clang.lib(clang.dll)
```
After adding `-DLLVM_BUILD_STATIC=ON` I got
```
FAILED: bin/c-index-test.exe
...
lld-link: error: could not open 'libclang_static.lib': no such file or directory
```
After adding `-DLIBCLANG_BUILD_STATIC=ON` I got
```
CMake Error:
Running
'C:/PROGRA~1/CMake/bin/ninja.exe' '-C' 'D:/build' '-t' 'recompact'
failed with:
ninja: error: build.ninja:107505: multiple rules generate lib/clang.lib
```
I would appreciate any help to understand what I'm missing.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs