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

Guansong Zhang via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Apr 8 09:20:10 PDT 2018


guansong added a comment.



In https://reviews.llvm.org/D44992#1060659, @Hahnfeld wrote:

> 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.


Understand your situation now, if you have 3.9.1 clang used as runtime build compiler, then this will cause issues when you specify ENABLE_BCLIB.

>> 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`...)

Checking that way is good, though personally I am in favor of using find llvm package to check LLVM version. Regardless I think we want the same thing here, i.e. to enable the bc lib path by default.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D44992





More information about the Openmp-commits mailing list