[Openmp-commits] [PATCH] D44992: [OpenMP] enable bc file compilation using the latest clang

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Apr 7 03:50:06 PDT 2018


Hahnfeld added a comment.

In https://reviews.llvm.org/D44992#1058800, @guansong wrote:

> Currently we only enable the bc file path when we specified on the cmake command line with these flags -DLIBOMPTARGET_NVPTX_CUDA_COMPILER and -DLIBOMPTARGET_NVPTX_SELECTED_BC_LINKER.


We already enable it as soon as the user says `-DLIBOMPTARGET_NVPTX_ENABLE_BCLIB` and we find the Clang compiler suitable. This change breaks the build with Clang 3.9.1 and I will revert it early next week to fix this regression.

> What we need is to check those compiler and linker's llvm version,  and then test that llvm version here.

We shouldn't hardcode the versions. I'd propose the following:

1. Can `LIBOMPTARGET_NVPTX_SELECTED_CUDA_COMPILER` compile `extern __shared__` without additional flag? (pre Clang 4.0)
2. If we add `-fcuda-rdc` will it work then? (Clang trunk and later on released version 7.0)

In both cases, we should default `LIBOMPTARGET_NVPTX_ENABLE_BCLIB` to `On`. (All these checks should probably reside in some `config-ix.cmake`...)


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D44992





More information about the Openmp-commits mailing list