This is needed for relocatable device code with CUDA 9 and later.
Before this patch, linking two or more object files resulted in
"Multiple definition" errors for a group of functions from
cuda_device_runtime_api.h which are annoted with "nv_weak".
CUDA headers already used this attribute in earlier releases, but
until CUDA 8.0 the only definitions in cuda_device_runtime_api.h
were conditional under defined(__CUDABE__) which is explicitly
undefined in Clang's wrapper. However since CUDA 9.0 this has
changed to !defined(__CUDACC_RTC__). Trying to add that define
resulted in errors that nvrtc_device_runtime.h could not be found.
Reported by Andrea Bocci!
No new, undocumented attributes, please.