Geoff Levner via llvm-dev
2021-Aug-03 10:05 UTC
[llvm-dev] building LLVM 11 with OpenMP on Windows
I'm not sure this is the right place to post... If not, feel free to redirect me. I am trying to build LLVM 11, including Clang and OpenMP, on a Windows machine with Visual Studio 2019 installed. Clearly the openmp project is not adapted to a multiple configuration build system like Visual Studio. It assumes that library files are in a lib directory rather than in lib/Release, lib/Debug, etc. I have tried to build with LIBOMP_COPY_EXPORTS disabled, which helps, but I still get link errors. So I have tried to build with nmake instead, which is a single configuration system like make. Strangely, this works for a release build, but not for a debug build. When I try to build in debug, I get error messages about unacceptable uses of std::atomic<unsigned int>. Perhaps a solution would be to compile LLVM/Clang and OpenMP with Visual Studio but separately? Only I don't know how to do that... Has anybody out there managed to solve this problem one way or another? Geoff -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210803/ff3d565a/attachment.html>
Michael Kruse via llvm-dev
2021-Aug-03 15:21 UTC
[llvm-dev] building LLVM 11 with OpenMP on Windows
Am Di., 3. Aug. 2021 um 05:05 Uhr schrieb Geoff Levner via llvm-dev <llvm-dev at lists.llvm.org>:> Perhaps a solution would be to compile LLVM/Clang and OpenMP with Visual Studio but separately? Only I don't know how to do that...You could use ninja on Windows (-cmake GNinja) which only has a single configuration per builddir. If compilation with cl.exe fail, try LLVM_ENABLE_RUMTIMES=openmp (instead of LLVM_ENABLE_PROJECTS=openmp) which will build libomp using just-built clang. Michael