LLVM-14.0.0 with OpenMP offloading Installation Issue, sm_70 architechture

Hello all,

I am a beginner in this domain and I am facing an error when I build LLVM/Clang with OpenMP Offloading to NVIDIA GPUs for llvm version-14.0.0. Please find the installation steps I followed and the error below.

$ wget https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/llvm-14.0.0.src.tar.xz

$ wget https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/clang-14.0.0.src.tar.xz

$ wget https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/openmp-14.0.0.src.tar.xz

$ tar xf llvm-14.0.0.src.tar.xz

$ tar xf clang-14.0.0.src.tar.xz

$ tar xf openmp-14.0.0.src.tar.xz

$ mv clang-14.0.0.src llvm-14.0.0.src/tools/clang

$ mv openmp-14.0.0.src llvm-14.0.0.src/projects/openmp

//build folder


$ make -j8

$ make -j8 install

//after executing above clang is installed in $(pwd)/…/install/bin/clang

//Inside build-openmp folder. Using the above installed clang I tried to rebuild openmp

$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/…/install-14 -DCMAKE_C_COMPILER=$(pwd)/…/install-14/bin/clang -DCMAKE_CXX_COMPILER=$(pwd)/…/install-14/bin/clang++ -DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES=35,60,70 …/llvm-14.0.0.src/projects/openmp

cmake fails with below error

– LIBOMPTARGET: Building the llvm-omp-device-info tool CMake Error at /gpfs/home/user/cost-model/install/lib/cmake/llvm/LLVM-Config.cmake:107 (target_link_libraries):

Cannot specify link libraries for target “llvm-omp-device-info” which is not built by this project.

I tried this multiple times, but I get the same error every time. Please help to solve the above issue or let me know if there is any issue in the steps followed. The above steps worked perfectly fine for previous versions of llvm/openmp.

Thank you!