about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDjzin <djzin@users.noreply.github.com>2017-06-09 07:07:58 +0100
committerDjzin <djzin@users.noreply.github.com>2017-06-09 07:07:58 +0100
commit83f1f118e56320667c04a522e05f09a9f4abb6ff (patch)
treefb65bf2463d65a9885b22a51557456e312d013a7
parentb795b7b43b5812a07b8fa7ed022b2f0f012a4950 (diff)
downloadrust-83f1f118e56320667c04a522e05f09a9f4abb6ff.tar.gz
rust-83f1f118e56320667c04a522e05f09a9f4abb6ff.zip
hack around bug in emscripten
-rw-r--r--src/libcore/mem.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs
index 91b348fb5d6..7c63ecd203e 100644
--- a/src/libcore/mem.rs
+++ b/src/libcore/mem.rs
@@ -503,7 +503,9 @@ pub fn swap<T>(x: &mut T, y: &mut T) {
         // that swapping either 32 bytes or 64 bytes at a time is most efficient for intel
         // Haswell E processors. LLVM is more able to optimize if we give a struct a
         // #[repr(simd)], even if we don't actually use this struct directly.
-        #[repr(simd)]
+        //
+        // FIXME repr(simd) broken on emscripten
+        #[cfg_attr(not(target_os = "emscripten"), repr(simd))]
         struct Block(u64, u64, u64, u64);
         struct UnalignedBlock(u64, u64, u64, u64);