Pass Cmd Line Args to CodeGenOpts?

Looking to write out cmd line args to ident in asm file, talking to some people it seems that this is currently not possible. So my question is what is the best way to go about attempting this in clang?

Thanks.