There is no point to importing at -O0, since we won't inline. We should
also disable other cross-module optimizations.
This change avoids 3.9 bug PR30774, which is due to the old DIGlobalVariable
references to GlobalVariable, and only at -O0 since the dangling
reference to a non-imported variable is not cleaned up. This is the
simplest workaround for the issue, which was addressed by reversing the
DIGlobalVariable to GlobalVariable edges (r281284).
Fixes PR30774.