Use cg_ssa's produce_final_output_artifacts in cg_clif
rustc_expected_cgu_reuse
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.