cuda .cu compile error

Dear list,

In cygwin, I encounter a problem below, any ideas?

$clang++ -O0 -g --cuda-gpu-arch=sm_35 -o vectorAddSimple2 vectorAddSimple2.cu --cuda-path=‘/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/’ -L’/cygdrive/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/’ -lcudart -save-temps -v
clang version 8.0.1
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\cygwin64\home\nancy\rpp_llvm\build_latest\Debug\bin
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find CUDA installation. Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find libdevice for sm_35. Provide path to different CUDA installation via --cuda-path, or pass -nocudalib to build without linking with libdevice.
clang++: error: cannot find CUDA installation. Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.

It works fine in linux.
$clang++ -O0 -g --cuda-gpu-arch=sm_35 --cuda-path=/usr/local/cuda -o vectorAddSimple2 vectorAddSimple2.cu -L/usr/local/cuda/lib64 -lcudart -save-temps -v

I am not terribly surprised that it doesn’t work on cygwin…

If you want help patching clang it shouldn’t be too hard to get it to parse the contents of the cuda install, which is where it’s currently failing. No idea if it will work after you fix that, though.