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

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jan 4 19:11:48 PST 2021


tianshilei1992 added a comment.

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

> In D93738#2476692 <https://reviews.llvm.org/D93738#2476692>, @tianshilei1992 wrote:
>
>> Building runtimes is not part of building LLVM. It is different from building OpenMP using CMake argument `LLVM_ENABLE_PROJECTS `.
>
> It might be different, but your change still breaks the OpenMP tests, when OpenMP is built using `LLVM_ENABLE_PROJECTS`.
>
> Can you test for the clang target and only set the dependency, if the target exists in the current configuration?

Yes, I did the following test:

  $ cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/Documents/deploy/llvm/onepass -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;openmp" -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -LLVM_INCLUDE_BENCHMARKS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_75 -DLIBOMP_INSTALL_ALIASES=OFF $HOME/Documents/vscode/llvm-project/llvm
  $ ninja
  $ ninja check-libomp
  FAIL: libomp :: lock/omp_init_lock.c (116 of 240)
  ******************** TEST 'libomp :: lock/omp_init_lock.c' FAILED ********************
  Script:
  --
  : 'RUN: at line 1';   /nvm/0/shiltian/build/llvm/onepass/./bin/clang -fopenmp -pthread -fno-experimental-isel  -I /home/shiltian/Documents/vscode/llvm-project/openmp/runtime/test -I /nvm/0/shiltian/build/llvm/onepass/projects/openmp/runtime/src -L /nvm/0/shiltian/build/llvm/onepass/lib  -I /home/shiltian/Documents/vscode/llvm-project/openmp/runtime/test/ompt /home/shiltian/Documents/vscode/llvm-project/openmp/runtime/test/lock/omp_init_lock.c -o /nvm/0/shiltian/build/llvm/onepass/projects/openmp/runtime/test/lock/Output/omp_init_lock.c.tmp -lm -latomic && /nvm/0/shiltian/build/llvm/onepass/projects/openmp/runtime/test/lock/Output/omp_init_lock.c.tmp
  --
  Exit Code: -11
  
  Command Output (stdout):
  --
  $ ":" "RUN: at line 1"
  $ "/nvm/0/shiltian/build/llvm/onepass/./bin/clang" "-fopenmp" "-pthread" "-fno-experimental-isel" "-I" "/home/shiltian/Documents/vscode/llvm-project/openmp/runtime/test" "-I" "/nvm/0/shiltian/build/llvm/onepass/projects/openmp/runtime/src" "-L" "/nvm/0/shiltian/build/llvm/onepass/lib" "-I" "/home/shiltian/Documents/vscode/llvm-project/openmp/runtime/test/ompt" "/home/shiltian/Documents/vscode/llvm-project/openmp/runtime/test/lock/omp_init_lock.c" "-o" "/nvm/0/shiltian/build/llvm/onepass/projects/openmp/runtime/test/lock/Output/omp_init_lock.c.tmp" "-lm" "-latomic"
  $ "/nvm/0/shiltian/build/llvm/onepass/projects/openmp/runtime/test/lock/Output/omp_init_lock.c.tmp"
  note: command had no output on stdout or stderr
  error: command failed with exit status: -11
  
  --
  
  ********************
  ********************
  Failed Tests (1):
    libomp :: lock/omp_init_lock.c
  
  
  Testing Time: 50.24s
    Unsupported      :   7
    Passed           : 230
    Expectedly Failed:   2
    Failed           :   1

Although there was a failed case, we can still observe that `clang` was being used properly for the test, and we don't have it, `clang-resource-headers` as well, in the dependence.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93738



More information about the Openmp-commits mailing list