cannot build CUDA support with llvm-trunk

Hi Pierre,

> Are you sure it won't build with CUDA support? The logs you linked only say it does not use some of the variables you defined, not that it failed to configure the project or build it. It could be due to CMake (since 3.8) supporting CUDA as a primary language and no longer needing to use `find_package(CUDA)`. The includes and path to the libraries should be automatically added, so they no longer use those variables you were setting manually.

You are right, it still detects CUDA, but doesn't build libomptarget which was
built before.

loki introduction 109 clang -v
clang version 6.0.0 (trunk 310065)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/llvm-trunk/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Selected GCC installation: /usr/lib64/gcc/x86_64-suse-linux/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 8.0

loki introduction 110 clang -fopenmp -fopenmp-targets=x86_64-unknown-linux-gnu dot_prod_accelerator_OpenMP.c -lomptarget -lm
/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lomptarget
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
loki introduction 111

I checked out the following projects.

svn co llvm
cd llvm/tools
svn co clang
svn co polly
cd clang/tools
svn co extra
cd ../../../projects
svn co compiler-rt
svn co openmp
svn co libomptarget
cd ../..

Do you or any other person have an idea why libomptarget will not be
built? Thank you very much for any help in advance.

Kind regards


> I don't have a computer at hand to check that this is indeed the issue, though.
> See and for more details about the new support.