[Openmp-commits] [PATCH] D103545: [NFC][libomptarget] Reduce the dependency on libelf
Vyacheslav Zakharin via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jun 18 08:59:52 PDT 2021
vzakhari added a comment.
In D103545#2827177 <https://reviews.llvm.org/D103545#2827177>, @ronlieb wrote:
>> Thank you, @ronlieb! I am able to reproduce it. It seems that `LLVM_ENABLE_RUNTIMES` behavior is quite different from the `-DLLVM_ENABLE_PROJECTS="openmp"` that I use (so I did not see this issue before). It seems to me that in `LLVM_ENABLE_RUNTIMES` mode, `openmp` is configured/built as a standalone project using `clang` built by the "main" cmake/build step, but for some reason `OPENMP_STANDALONE_BUILD` is `false`. I am not sure about the right solution yet. Can you please add `openmp` to your `-DLLVM_ENABLE_PROJECTS="clang;lld"` and remove `"-DLLVM_ENABLE_RUNTIMES="openmp"` as a temporary workaround?
>
> i added openmp to PROJECTS, and removed -DLLVM_ENABLE_RUNTIMES="openmp"
>
> results in error
>
> CMake Error at cmake/modules/LLVMExternalProjectUtils.cmake:358 (add_custom_target):
>
> add_custom_target cannot create target "check-openmp" because another
> target with the same name already exists. The existing target is a custom
> target created in source directory
> "/work/rlieberm/mono-repo/llvm-project/openmp". See documentation for
> policy CMP0002 for more details.
>
> Call Stack (most recent call first):
>
> runtimes/CMakeLists.txt:226 (llvm_ExternalProject_Add)
> runtimes/CMakeLists.txt:353 (runtime_default_target)
This is weird. The following command works for me: cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lld;openmp" -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" -DLLVM_ENABLE_ASSERTIONS=ON -DCLANG_DEFAULT_LINKER=lld ../llvm -GNinja
It looks like your cmake invocation still uses the `LLVM_ENABLE_RUNTIMES` path. Did you remove cmake cache before the reconfiguration? Anyway, I believe D104535 <https://reviews.llvm.org/D104535> should fix the `LLVM_ENABLE_RUNTIMES` build.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103545/new/
https://reviews.llvm.org/D103545
More information about the Openmp-commits
mailing list