I am trying to compile CUDA with clang, but the code I am trying to compile depends on a specific nvcc flag (-default-stream per-thread
). How can I tell clang to pass the flag to nvcc?
For example, I can compile with nvcc and everythign works fine:
nvcc -default-stream per-thread *.cu -o app
But when I compile from clang, the program does not behave correctly because I can not pass the default-steam
flag:
clang++ --cuda-gpu-arch=sm_35 -L/usr/local/cuda/lib64 *.cu -o app -lcudart_static -ldl -lrt -pthread
How do I get clang to pass flags to nvcc?