 +            .arg(format!("-triple={}", ctxt.target()))
 +            .arg("-o").arg(dst.join("morestack.o"))
 +            .arg(ctxt.src().join(format!("../rt/arch/{}/morestack.S", ctxt.arch())))
-+            .status().unwrap().success()
++            .status_or_panic().success()
 +    }
 +
 +    assert! {

+            .arg(dst.join("librustrt_native.a"))
+            .arg(dst.join("rust_try.o"))
+            .arg(dst.join("record_sp.o"))
+            .status().unwrap().success()
+    }
+
+    println!("cargo:rustc-link-lib=static=rustrt_native");

+            .arg(format!("ProjObjRoot={}", build_dir.display()))
+            .arg(format!("TargetTriple={}", ctxt.target()))
+            .arg("triple-builtins")
+            .status_or_panic().success()
+    }
+
+    fs::copy(build_dir.join("triple/builtins/libcompiler_rt.a"), dst.join("libcompiler-rt.a")).unwrap();
