#[cfg(not(jit))]
test_tls();
- #[cfg(not(jit))]
+ #[cfg(all(not(jit), target_os = "linux"))]
unsafe {
global_asm_test();
}
}
-#[cfg(not(jit))]
+#[cfg(all(not(jit), target_os = "linux"))]
extern "C" {
fn global_asm_test();
}
-#[cfg(not(jit))]
+#[cfg(all(not(jit), target_os = "linux"))]
global_asm! {
"
.global global_asm_test
return;
}
+ if tcx.sess.target.target.options.is_like_osx || tcx.sess.target.target.options.is_like_windows {
+ if global_asm.contains("__rust_probestack") {
+ return;
+ }
+
+ // FIXME fix linker error on macOS
+ tcx.sess.fatal("global_asm! is not yet supported on macOS and Windows");
+ }
+
let assembler = crate::toolchain::get_toolchain_binary(tcx.sess, "as");
let linker = crate::toolchain::get_toolchain_binary(tcx.sess, "ld");