[PATCH] D93738: [OpenMP] Not set OPENMP_STANDALONE_BUILD=ON when building OpenMP along with LLVM

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 3 11:53:41 PST 2021


tianshilei1992 added a comment.

In D93738#2476488 <https://reviews.llvm.org/D93738#2476488>, @protze.joachim wrote:

> If I build llvm-project using an old compiler, the dependencies are necessary in order to have clang built before running the OpenMP tests. Dropping the dependencies might cause issues in parallel builds, but will make the check-openmp targets incomplete.
> What is the problem in having the dependency there?

Building runtimes is not part of building LLVM. It is different from building OpenMP using CMake argument `LLVM_ENABLE_PROJECTS `. Instead, the CMake command for those runtimes will be invoked *after* building LLVM, so it's a two-pass compilation. In the second run, in addition to some specific CMake arguments to be passed through, one of the most important thing is to set C/C++ compiler to the `clang` built in the first run. Therefore, all CMake targets generated in the first run will not be valid in the second run. As a result, CMake raises an error that:

- The dependency target "clang" of target XXX does not exist.
- The dependency target "clang-resource-headers" of target XXX does not exist.

However, since we already know that C/C++ compiler for the runtimes is already set to `clang` explicitly, we can drop this dependences safely.

`LLVM_ENABLE_PROJECTS` says building those projects with toolchain same as building LLVM, which is actually a standalone build.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93738/new/

https://reviews.llvm.org/D93738



More information about the llvm-commits mailing list