this was slightly complicated because codegen_ssa doesn't have access to a tcx.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.