How to emit device-side IR when compiling cuda?

I’m trying:

clang+±3.8 -I/usr/local/cuda-7.5/include -emit-llvm -S -o llvm-sample.ll

This seems to emit host-side IR only?

I think I’m still in the wrong list. I’ll find the right list eventually…

Have you tried to pass the right target triple option?

i.e. clang -target …

Yes, I figured it out in the end, just need --cuda-device-only,