title: How to use Clang's CUDA compiler?
body: <p>I am on Ubuntu 17.10. I installed the CUDA 9.1 SDK from NVIDIA.</p>
  
  <p>This is what I tried:</p>
  
  <pre><code>~/GrinGoldMiner/src/Cudacka$ clang++-5.0 -Wl,--cuda-path=/usr/local/cuda-9.1 kernel.cu
  clang: error: cannot find libdevice for sm_20. 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 CUDA installation.  Provide its path via --cuda-path, or pass -nocudainc to build without CUDA includes.
  </code></pre>
  
  <p>Obviously it doesn't work. It seems like the linker flags are not getting passed. How can I pass them correctly?</p>