]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sys/sgx/abi/panic.rs
SGX target: fix std unit tests
[rust.git] / src / libstd / sys / sgx / abi / panic.rs
index 83411cb5b4c26fd9e58672510b2093c9f7f88be0..de86394b4b88cdfd8013b57b089988f60567df04 100644 (file)
@@ -49,7 +49,7 @@ fn flush(&mut self) -> io::Result<()> {
     }
 }
 
-#[no_mangle]
+#[cfg_attr(not(test), no_mangle)]
 pub extern "C" fn panic_msg(msg: &str) -> ! {
     let _ = SgxPanicOutput::new().map(|mut out| out.write(msg.as_bytes()));
     usercalls::exit(true)