]> git.lizzy.rs Git - rust.git/blobdiff - src/libpanic_abort/lib.rs
Add x86_64-fortanix-unknown-sgx target to libstd and dependencies
[rust.git] / src / libpanic_abort / lib.rs
index b86928534cb244f79ccc09202963576208bf17fc..95c3514185e2f87cce797e4f5a70e47643e12a8a 100644 (file)
@@ -66,6 +66,12 @@ unsafe fn abort() -> ! {
     unsafe fn abort() -> ! {
         core::intrinsics::abort();
     }
+
+    #[cfg(target_env="sgx")]
+    unsafe fn abort() -> ! {
+        extern "C" { pub fn panic_exit() -> !; }
+        panic_exit();
+    }
 }
 
 // This... is a bit of an oddity. The tl;dr; is that this is required to link
@@ -97,7 +103,10 @@ unsafe fn abort() -> ! {
 pub mod personalities {
     #[no_mangle]
     #[cfg(not(any(
-        target_arch = "wasm32",
+        all(
+            target_arch = "wasm32",
+            not(target_os = "emscripten"),
+        ),
         all(
             target_os = "windows",
             target_env = "gnu",