[all-commits] [llvm/llvm-project] 7be328: [OpenMP] Not set OPENMP_STANDALONE_BUILD=ON when b...

Shilei Tian via All-commits all-commits at lists.llvm.org
Sun Jan 10 13:51:08 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7be3285248bf54d0784a76174cf44cf7c1e780a5
      https://github.com/llvm/llvm-project/commit/7be3285248bf54d0784a76174cf44cf7c1e780a5
  Author: Shilei Tian <tianshilei1992 at gmail.com>
  Date:   2021-01-10 (Sun, 10 Jan 2021)

  Changed paths:
    M llvm/runtimes/CMakeLists.txt
    M openmp/cmake/OpenMPTesting.cmake

  Log Message:
  -----------
  [OpenMP] Not set OPENMP_STANDALONE_BUILD=ON when building OpenMP along with LLVM

For now, `*_STANDALONE_BUILD` is set to ON even if they're built along
with LLVM because of issues mentioned in the comments. This can cause some issues.
For example, if we build OpenMP along with LLVM, we'd like to copy those OpenMP
headers to `<prefix>/lib/clang/<version>/include` such that `clang` can find
those headers without using `-I <prefix>/include` because those headers will be
copied to `<prefix>/include` if it is built standalone.

In this patch, we fixed the dependence issue in OpenMP such that it can be built
correctly even with `OPENMP_STANDALONE_BUILD=OFF`. The issue is in the call to
`add_lit_testsuite`, where `clang` and `clang-resource-headers` are passed as
`DEPENDS`. Since we're building OpenMP along with LLVM, `clang` is set by CMake
to be the C/C++ compiler, therefore these two dependences are no longer needed,
where caused the dependence issue.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D93738




More information about the All-commits mailing list