Trouble compiling RT_CALLABLE_PROGRAM into ptx when upgrading to CUDA 8

I am using Win7, Optix 4.0.2, VS2012. project set to use compute_30,sm_30.

My project runs fine with CUDA 7.5 but when I change my project to use CUDA 8.0, none of the ptx files that my project generate have any of the RT_CALLABLE_PROGRAM functions included in them.

Can anyone provide any insights to what might cause this or maybe suggest some troubleshooting ideas.

CUDA 8.0 does more aggressive dead code elimination and needs the “–relocatable-device-code=true” or “-rdc=true” option to force code generation of OptiX callable programs.

Thank you for the answer and the link @Detlef Roettger. It was very helpful!