Disable global_asm! on macOS for now
This commit is contained in:
parent
893497c93e
commit
8cf38181ad
@ -285,18 +285,18 @@ fn main() {
|
||||
#[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
|
||||
|
@ -277,6 +277,15 @@ fn codegen_global_asm(tcx: TyCtxt<'_>, cgu_name: &str, global_asm: &str) {
|
||||
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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user