NVCC options to enable both optimization and debug information for device code

According to the doc, ‘-G’ option turns off all optimizations on device code.
How to enable both optimization and debug information for device code?