enabling CodeGen options before Pass is ran?

Is there anyway for me to set a option for CodeGen(CodeGenOptions::EmitDeclMetadata) before my Pass is ran? I’m guessing time my Pass is actually running its too late. I don’t understand the consequences of running CodeGen a second, is this a possibility or is there a better approach.

Thank you