[Openmp-commits] [PATCH] D123177: [libomptarget] Add device RTL to regression test dependencies.

Dimitry Andric via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Jul 3 07:27:22 PDT 2022


dim added a comment.
Herald added a subscriber: kosarev.

In D123177#3443809 <https://reviews.llvm.org/D123177#3443809>, @brooks wrote:

> This fails to configure in cmake when enabled as a project.
>
>   $ cmake ../llvm -DLLVM_ENABLE_PROJECTS='llvm;clang;lld;openmp'
>   ...
>   -- Configuring done
>   CMake Error at /home/bed22/git/llvm-project/openmp/libomptarget/plugins/amdgpu/CMakeLists.txt:74 (add_dependencies):
>     The dependency target "omptarget.devicertl.amdgpu" of target
>     "omptarget.rtl.amdgpu" does not exist.
>   
>   
>   -- Generating done
>   CMake Generate step failed.  Build files cannot be regenerated correctly.
>
> Reverting this commit allows cmake to succeed. The linkage fix in rG2e0cb61570ec <https://reviews.llvm.org/rG2e0cb61570eceff04a18fbcbeb0014ece2b56438> does not fix this issue.

Yes, I just ran into the same issue doing a build of recent llvm with openmp enabled on FreeBSD. The issue is related to a recent change in DeviceRTL, e.g. `openmp/libomptarget/DeviceRTL/CMakeLists.txt` has a block:

  # TODO: This part needs to be refined when libomptarget is going to support
  # Windows!
  # TODO: This part can also be removed if we can change the clang driver to make
  # it support device only compilation.
  if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
    set(aux_triple x86_64-unknown-linux-gnu)
  elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "ppc64le")
    set(aux_triple powerpc64le-unknown-linux-gnu)
  elseif(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "aarch64")
    set(aux_triple aarch64-unknown-linux-gnu)
  else()
    libomptarget_say("Not building DeviceRTL: unknown host arch: ${CMAKE_HOST_SYSTEM_PROCESSOR}")
    return()
  endif()

On FreeBSD, `x86_64` is named `amd64` so the CMake configuration stage gives:

  ...
  -- LIBOMPTARGET: Building DeviceRTL. Using clang from in-tree build
  -- LIBOMPTARGET: Not building DeviceRTL: unknown host arch: amd64

Apparently the part in this review that adds the `omptarget.devicertl.amdgpu` dependency does not account for this dependency not being available at all?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123177



More information about the Openmp-commits mailing list