Nvidia cuda-memcheck linenumbers

I’m trying to use the memory checker provided from cuda-memcheck on an OpenCL program. I’ve got this working and it’s helped me find a memory alignment problem. But I can’t get the line number as I need to tell nvcc to use the -lineinfo command. So far I have not found any way to get this passed in during the compiles. I tried -cl-nv-verbose and -clopt-disable but no love.

I have some vague memory of their being a way to pass environment variables to nvcc but I can’t find that either. Anyone had any luck doing this? Or another memory checker they’d recommend?