[Openmp-commits] [PATCH] D125315: [Libomptarget] Build the device runtime as a static library

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon May 16 04:52:14 PDT 2022


jhuber6 added a comment.

In D125315#3515223 <https://reviews.llvm.org/D125315#3515223>, @nikic wrote:

> This change has broken the build of libomp with gcc, as it appears to be using clang-specific options:
>
>   g++: error: unrecognized command-line option '-Xopenmp-target=nvptx64-nvidia-cuda'
>   g++: error: unrecognized command-line option '--cuda-feature=+ptx61'
>   g++: error: unrecognized command-line option '-nocudalib'; did you mean '-nostdlib'?
>   g++: error: unrecognized command-line option '-nogpulib'
>   g++: error: unrecognized command-line option '--offload-arch=sm_35'
>   g++: error: unrecognized command-line option '--offload-arch=sm_37'
>   g++: error: unrecognized command-line option '--offload-arch=sm_50'
>   g++: error: unrecognized command-line option '--offload-arch=sm_52'
>   g++: error: unrecognized command-line option '--offload-arch=sm_53'
>   g++: error: unrecognized command-line option '--offload-arch=sm_60'; did you mean '--offload-abi=lp64'?
>   g++: error: unrecognized command-line option '--offload-arch=sm_61'; did you mean '--offload-abi=lp64'?
>   g++: error: unrecognized command-line option '--offload-arch=sm_62'
>   g++: error: unrecognized command-line option '--offload-arch=sm_70'
>   g++: error: unrecognized command-line option '--offload-arch=sm_72'
>   g++: error: unrecognized command-line option '--offload-arch=sm_75'
>   g++: error: unrecognized command-line option '--offload-arch=sm_80'
>   g++: error: unrecognized command-line option '--offload-arch=sm_86'
>   g++: error: unrecognized command-line option '--offload-arch=gfx700'
>   g++: error: unrecognized command-line option '--offload-arch=gfx701'
>   g++: error: unrecognized command-line option '--offload-arch=gfx801'
>   g++: error: unrecognized command-line option '--offload-arch=gfx803'
>   g++: error: unrecognized command-line option '--offload-arch=gfx900'
>   g++: error: unrecognized command-line option '--offload-arch=gfx902'
>   g++: error: unrecognized command-line option '--offload-arch=gfx906'
>   g++: error: unrecognized command-line option '--offload-arch=gfx908'
>   g++: error: unrecognized command-line option '--offload-arch=gfx90a'
>   g++: error: unrecognized command-line option '--offload-arch=gfx90c'
>   g++: error: unrecognized command-line option '--offload-arch=gfx940'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1010'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1030'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1031'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1032'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1033'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1034'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1035'
>   g++: error: unrecognized command-line option '--offload-arch=gfx1036'

The OpenMP offloading runtime was always intended to be built with a newly-built Clang, either through a two-phase build or with `-DLLVM_ENABLE_RUNTIMES=openmp`. This patch added some code that uses standard CMake to build the library, rather than locating the `clang` binary directly. I could add some code to skip building this static library, or the device runtime entirely, if the compiler isn't an up-to-date Clang. I'm not sure what the best solution to this is, since we always required that this was to be built with Clang, this patch just made it a more strict requirement.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125315



More information about the Openmp-commits mailing list