| Issue |
61539
|
| Summary |
Window MinGW unable to build due to pthread mingw and ldd
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
tilkinsc
|
I am trying to rebuild llvm clang and family to use ldd built with mingw64. This means that clang++ depends on the mingw64 linker. Apparently pthread is needed to build llvm and clang and family. However, llvm doesn't add the -pthread when ninja in generated with cmake so it can. I was able to ctrl + f " FLAGS = " and add -pthread to build successfully.
In short, explicit -pthread is needed when ldd depends on mingw64.
```bat
git clone --depth 1 --config core.autocrlf=false https://github.com/llvm/llvm-project
pushd llvm-project
cmake -DLLVM_ENABLE_PROJECTS="clang;lld;clang-tools-extra;lldb;cross-project-tests" -DCMAKE_INSTALL_PREFIX="C:/llvm/" -DLLVM_USE_LINKER=ldd -DCMAKE_BUILD_TYPE=Release -D -B build -S llvm -G "Ninja"
pushd build
ninja -j 24
popd
popd
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs