This works for me:
nvcc -optix-ir -arch=sm_86 --use_fast_math -I“C:\ProgramData\NVIDIA Corporation\OptiX SDK 9.0.0\include” ..\triangle.cu
without the fast math option I get the crash.
Note that the SDK 9.0 compiles the samples with:
nvcc -optix-ir -arch=sm_50 --use_fast_math -lineinfo -Wno-deprecated-gpu-targets --use-local-env -I%sdkinclude% file.cu