about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-12-16 12:09:34 -0800
committerBrian Anderson <banderson@mozilla.com>2011-12-16 18:18:43 -0800
commitab4f35c1f1247bd745378621a22340cbf8b7030d (patch)
tree78c372520ad316a07e136f6b3f0c11705548eccb
parent121c4201844c1bec4a8f2a4450e4b9330ee9bf28 (diff)
downloadrust-ab4f35c1f1247bd745378621a22340cbf8b7030d.tar.gz
rust-ab4f35c1f1247bd745378621a22340cbf8b7030d.zip
rt: Only call check_stack_alignment on linux
-rw-r--r--src/rt/rust_upcall.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index dd7e275cd04..ec1e37bd85f 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -19,8 +19,13 @@
 // correctly. Strategically placed at entry to upcalls because they begin on
 // the rust stack and happen frequently enough to catch most stack changes,
 // including at the beginning of all landing pads.
+// FIXME: Only seems to work on linux
+#ifdef __linux__
 extern "C" void
 check_stack_alignment() __attribute__ ((aligned (16)));
+#else
+static void check_stack_alignment() { }
+#endif
 
 #define SWITCH_STACK(A, F) upcall_call_shim_on_c_stack((void*)A, (void*)F)