about summary refs log tree commit diff
path: root/src/libnative
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-07-04 13:46:25 +0000
committerbors <bors@rust-lang.org>2014-07-04 13:46:25 +0000
commit04ac2b087e10c8d23e41d5f910ea2069e77c9e73 (patch)
treefb1e58fa693faee6cf9ed2f6f46af45d4e43b9b7 /src/libnative
parentc0b76abf91aa204be0cb9336988eec48d91bcfd7 (diff)
parentb86440f85f195b73c656092d4f5ecefcd19fec71 (diff)
downloadrust-04ac2b087e10c8d23e41d5f910ea2069e77c9e73.tar.gz
rust-04ac2b087e10c8d23e41d5f910ea2069e77c9e73.zip
auto merge of #15403 : vhbit/rust/ios-llvm-fixme, r=pcwalton
It was required to get iOS compilable but since
that time a couple of changes were introduced
which cause the same bug to re-appear and broke 
build anyway. Fixing all of them doesn’t look a 
viable alternative to me as it will pollute the 
code too much.

So it should be fixed from LLVM side and I hope 
LLVM will upstream corresponding changes in a 
month.

Meanwhile, who wants to play with Rust on iOS is 
better to use a fork which uses patched LLVM:
https://github.com/vhbit/rust/tree/ios . It may 
lag behind master a bit, but it is Travis-checked 
to compile successfully.
Diffstat (limited to 'src/libnative')
-rw-r--r--src/libnative/io/timer_unix.rs17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/libnative/io/timer_unix.rs b/src/libnative/io/timer_unix.rs
index 8d6563bafad..87c320e0457 100644
--- a/src/libnative/io/timer_unix.rs
+++ b/src/libnative/io/timer_unix.rs
@@ -93,20 +93,7 @@ pub fn now() -> u64 {
     }
 }
 
-
-// Note: although the last parameter isn't used there is no way now to
-// convert it to unit type, because LLVM dies in SjLj preparation
-// step (unfortunately iOS uses SjLJ exceptions)
-//
-// It's definitely a temporary workaround just to get it working.
-// So far it looks like an LLVM issue and it was reported:
-// http://llvm.org/bugs/show_bug.cgi?id=19855
-// Actually this issue is pretty common while compiling for armv7 iOS
-// and in most cases it is simply solved by using --opt-level=2 (or -O)
-//
-// For this specific case unfortunately turning optimizations wasn't
-// enough.
-fn helper(input: libc::c_int, messages: Receiver<Req>, _: int) {
+fn helper(input: libc::c_int, messages: Receiver<Req>, _: ()) {
     let mut set: c::fd_set = unsafe { mem::zeroed() };
 
     let mut fd = FileDesc::new(input, true);
@@ -218,7 +205,7 @@ impl Timer {
     pub fn new() -> IoResult<Timer> {
         // See notes above regarding using int return value
         // instead of ()
-        unsafe { HELPER.boot(|| {0}, helper); }
+        unsafe { HELPER.boot(|| {}, helper); }
 
         static mut ID: atomics::AtomicUint = atomics::INIT_ATOMIC_UINT;
         let id = unsafe { ID.fetch_add(1, atomics::Relaxed) };