How to use static linking with nvcc?

How can i compile cuda code with static linking library?
I want to run my programs in other computers which don’t have the cudatoolkit, but some errors were reported , which said some *.so files missing.

Is there such options for nvcc?

thank you

The short answer is that you can’t…

If order to compile with a static library the cuda toolkit would have to ship with a static version of libcudart such as libcudart.a… which it doesn’t…