diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-08-12 12:30:24 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-08-12 12:38:48 +0000 |
| commit | f76ca2247998bff4e10b73fcb464a0a83edbfeb0 (patch) | |
| tree | e8106540ae6ea395c5fdf9f92e78995285881c03 /example | |
| parent | e45f6000a0bd46d4b7580db59c86f3d30adbc270 (diff) | |
| download | rust-f76ca2247998bff4e10b73fcb464a0a83edbfeb0.tar.gz rust-f76ca2247998bff4e10b73fcb464a0a83edbfeb0.zip | |
Enable inline asm on macOS
Diffstat (limited to 'example')
| -rw-r--r-- | example/mini_core_hello_world.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/example/mini_core_hello_world.rs b/example/mini_core_hello_world.rs index 7e9cbe1bba5..e83be3a3df5 100644 --- a/example/mini_core_hello_world.rs +++ b/example/mini_core_hello_world.rs @@ -321,7 +321,7 @@ fn main() { #[cfg(not(any(jit, windows)))] test_tls(); - #[cfg(all(not(jit), target_arch = "x86_64", target_os = "linux"))] + #[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "darwin")))] unsafe { global_asm_test(); } @@ -343,7 +343,7 @@ fn main() { } } -#[cfg(all(not(jit), target_arch = "x86_64", target_os = "linux"))] +#[cfg(all(not(jit), target_arch = "x86_64", any(target_os = "linux", target_os = "darwin")))] extern "C" { fn global_asm_test(); } @@ -358,6 +358,16 @@ global_asm! { " } +#[cfg(all(not(jit), target_arch = "x86_64", target_os = "darwin"))] +global_asm! { + " + .global _global_asm_test + _global_asm_test: + // comment that would normally be removed by LLVM + ret + " +} + #[repr(C)] enum c_void { _1, |
