[Openmp-dev] Building OpenMP as runtime vs project

Shilei Tian via Openmp-dev openmp-dev at lists.llvm.org
Tue Feb 9 09:07:27 PST 2021


Hi Joachim,

> Any of the test targets are not available in the top-level build directory.
> $ ninja check-libomp
> ninja: error: unknown target 'check-libomp'
> 
> Is anyone working on enabling this, if we really want to move towards
> building OpenMP as runtime?


This is because all targets in nested CMake run (the second CMake configure you saw to configure OpenMP) will not be exposed to the top level. Therefore, all OpenMP specific targets can not be used at the root build directory. However, you can use any of the following methods to invoke a test:
- ninja check-openmp
- Go to directory runtimes/runtimes-bins/openmp, and do whatever you want like you’re in a standalone CMake project.

We’re not working on enabling it, and I’m not sure whether it is doable.

> The other issue when building OpenMP as a runtime is specific for the
> tests check-libarcher:
> 
> The tests depend on ThreadSanitizer support in the compiler. For the
> in-tree build we currently check, whether the tsan target exists and
> turn on the test in that case. When building OpenMP as a runtime, the
> tsan target does not exist in that cmake environment. How should we pass
> such and similar information down to the runtime build?


We currently only use two packages for the second run: LLVM and Clang. If ThreadSanitizer is not part of the two packages, or it is not an external target, then it cannot be used. You can add the package you want in runtimes/CMakeLists.txt.

Regards,
Shilei

> On Feb 9, 2021, at 7:22 AM, Joachim Protze via Openmp-dev <openmp-dev at lists.llvm.org> wrote:
> 
> Hi all,
> 
> after recent build issues when building OpenMP as a project
> (LLVM_ENABLE_PROJECTS="...;openmp"), I started to build OpenMP as a
> runtime (LLVM_ENABLE_RUNTIMES="...;openmp").
> Currently I see two issues with this build setup:
> 
> Any of the test targets are not available in the top-level build directory.
> $ ninja check-libomp
> ninja: error: unknown target 'check-libomp'
> 
> Is anyone working on enabling this, if we really want to move towards
> building OpenMP as runtime?
> 
> 
> The other issue when building OpenMP as a runtime is specific for the
> tests check-libarcher:
> 
> The tests depend on ThreadSanitizer support in the compiler. For the
> in-tree build we currently check, whether the tsan target exists and
> turn on the test in that case. When building OpenMP as a runtime, the
> tsan target does not exist in that cmake environment. How should we pass
> such and similar information down to the runtime build?
> 
> 
> Best
> Joachim
> 
> 
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20210209/9824b833/attachment.html>


More information about the Openmp-dev mailing list