From 6eea0ffc651c61cb08fca524298268e1a07eac82 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Mon, 4 Nov 2019 16:10:02 -0500 Subject: [PATCH] Add more detailed codegen comment --- src/librustc_codegen_ssa/mir/block.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/librustc_codegen_ssa/mir/block.rs b/src/librustc_codegen_ssa/mir/block.rs index 9361a7c3ea45..14be0e80fb48 100644 --- a/src/librustc_codegen_ssa/mir/block.rs +++ b/src/librustc_codegen_ssa/mir/block.rs @@ -532,6 +532,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { // We should only emit a call to this intrinsic in #[cfg(miri)] mode, // which means that we will never actually use the generate object files // (we will just be interpreting the MIR) + // + // Note that we still need to be able to codegen *something* for this intrisnic: + // Miri currently uses Xargo to build a special libstd. As a side effect, + // we generate normal object files for libstd - while these are never used, + // we still need to be able to build them. if intrinsic == Some("miri_start_panic") { bx.abort(); bx.unreachable();