Skip to content

Commit 78cd77f

Browse files
committed
Give better error for unsupported asm!()
1 parent eb30083 commit 78cd77f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/inline_asm.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,16 @@ pub(crate) fn codegen_inline_asm<'tcx>(
228228
fx.bcx.ins().jump(destination_block, &[]);
229229
return;
230230
}
231+
232+
if cfg!(not(feature = "inline_asm")) {
233+
fx.tcx.sess.span_err(
234+
span,
235+
"asm! and global_asm! support is disabled while compiling rustc_codegen_cranelift",
236+
);
237+
} else {
238+
fx.tcx.sess.span_err(span, "asm! and global_asm! are not yet supported on Windows");
239+
}
240+
return;
231241
}
232242

233243
let operands = operands

0 commit comments

Comments
 (0)