Skip to content

Commit ab4f35c

Browse files
committed
rt: Only call check_stack_alignment on linux
1 parent 121c420 commit ab4f35c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rt/rust_upcall.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@
1919
// correctly. Strategically placed at entry to upcalls because they begin on
2020
// the rust stack and happen frequently enough to catch most stack changes,
2121
// including at the beginning of all landing pads.
22+
// FIXME: Only seems to work on linux
23+
#ifdef __linux__
2224
extern "C" void
2325
check_stack_alignment() __attribute__ ((aligned (16)));
26+
#else
27+
static void check_stack_alignment() { }
28+
#endif
2429

2530
#define SWITCH_STACK(A, F) upcall_call_shim_on_c_stack((void*)A, (void*)F)
2631

0 commit comments

Comments
 (0)