Right now we have to provide not just “-fopenmp” but “-fopenmp=libiomp5” if we want full support for OpenMP when compiling on Linux (without the explicit library, _OPENMP is undefined and there is only a single thread). Are there plans to drop this requirement and support plain “-fopenmp”? I’m asking since it would make things much easier for our users when transitioning from gcc to clang.
Thanks a lot!
there is a CMake configuration "-DCLANG_DEFAULT_OPENMP_RUNTIME=libomp" which one can use to make "-fopenmp" work by default.
And from my information there are plans to make it the default when this library is fully integrated into the LLVM build system. This is currently work in progress...
Thank you for the fast answer. Just to be clear: the -DCLANG_DEFAULT_OPENMP_RUNTIME=libomp flag is specified at configuration time to LLVM, not to the libomp runtime, am I correct?
correct, it must be passed to LLVM/clang!
Thanks again, your proposed solution fixed it for me.