Skip to content

Commit 80ca1e1

Browse files
author
Jorge Aparicio
committed
don't build an object file for emit=asm,llvm-ir
1 parent e7cae41 commit 80ca1e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/librustc_driver/driver.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,11 @@ pub fn phase_4_translate_to_llvm<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
10561056
pub fn phase_5_run_llvm_passes(sess: &Session,
10571057
trans: &trans::CrateTranslation,
10581058
outputs: &OutputFilenames) -> CompileResult {
1059-
if sess.opts.cg.no_integrated_as || sess.target.target.options.no_integrated_as {
1059+
if sess.opts.cg.no_integrated_as ||
1060+
(sess.target.target.options.no_integrated_as &&
1061+
(outputs.outputs.contains_key(&OutputType::Object) ||
1062+
outputs.outputs.contains_key(&OutputType::Exe)))
1063+
{
10601064
let output_types = OutputTypes::new(&[(OutputType::Assembly, None)]);
10611065
time(sess.time_passes(),
10621066
"LLVM passes",

0 commit comments

Comments
 (0)