[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 07:05:51 PDT 2021
vzakhari added a comment.
In D103545#2826676 <https://reviews.llvm.org/D103545#2826676>, @ronlieb wrote:
> [AMD Official Use Only]
>
> Trunk as of this morning
> work/rlieberm/mono-repo/llvm-project/openmp/libomptarget/plugins/common/elf_common/elf_common.cpp
> /work/rlieberm/mono-repo/llvm-project/openmp/libomptarget/plugins/common/elf_common/elf_common.cpp:15:10: fatal error: 'llvm/BinaryFormat/Magic.h' file not found
> #include "llvm/BinaryFormat/Magic.h"
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> 1 error generated.
> [182/204] Building CXX object openmp/tools/archer/CMakeFiles/archer.dir/ompt-tsan.cpp.o
>
> Cmake command, you can probably drop the CMAKE_INSTALL_PREFIX
>
> cmake -DCMAKE_INSTALL_PREFIX=/home/rlieberm/rocm/trunk_1.0 \
>
> -DCMAKE_BUILD_TYPE=Release \
> -DLLVM_ENABLE_PROJECTS="clang;lld" \
> -DLLVM_TARGETS_TO_BUILD="X86;AMDGPU" \
> -DLLVM_ENABLE_ASSERTIONS=ON \
> -DLLVM_ENABLE_RUNTIMES="openmp" \
> -DCLANG_DEFAULT_LINKER=lld \
> ../llvm -GNinja
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?
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