Skip to content

Commit 2d622e5

Browse files
author
bors-servo
authored
Auto merge of #168 - NatalyaKovalova:ios-support, r=jdm
Add iOS support ability to build ipc-channel for iOS platform have been added in this PR. For building could be used: `cargo build --target aarch64-apple-ios` @larsbergstrom , could you, please, make code review and accept changes?
2 parents 583f90c + 448a802 commit 2d622e5

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// option. This file may not be copied, modified, or distributed
88
// except according to those terms.
99

10-
#![cfg_attr(any(feature = "force-inprocess", target_os = "windows", target_os = "android"),
10+
#![cfg_attr(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"),
1111
feature(mpsc_select))]
1212
#![cfg_attr(all(feature = "unstable", test), feature(specialization))]
1313

@@ -18,7 +18,7 @@ extern crate bincode;
1818
extern crate libc;
1919
extern crate rand;
2020
extern crate serde;
21-
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android"))]
21+
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"))]
2222
extern crate uuid;
2323
#[cfg(all(not(feature = "force-inprocess"), any(target_os = "linux",
2424
target_os = "freebsd")))]

src/platform/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ mod os {
4343
pub use super::macos::*;
4444
}
4545

46-
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android"))]
46+
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"))]
4747
mod inprocess;
48-
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android"))]
48+
#[cfg(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios"))]
4949
mod os {
5050
pub use super::inprocess::*;
5151
}

src/platform/test.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use std::time::{Duration, Instant};
1515
use std::thread;
1616

1717
use platform::{OsIpcSender, OsIpcOneShotServer};
18-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
18+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
1919
use libc::{kill, SIGSTOP, SIGCONT};
20-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
20+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
2121
use test::{fork, Wait};
2222

2323
#[test]
@@ -396,7 +396,7 @@ fn receiver_set() {
396396
}
397397

398398
#[test]
399-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
399+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
400400
fn receiver_set_eintr() {
401401
let (server, name) = OsIpcOneShotServer::new().unwrap();
402402
let child_pid = unsafe {
@@ -644,7 +644,7 @@ fn server_connect_first() {
644644
(data, vec![], vec![]));
645645
}
646646

647-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
647+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
648648
#[test]
649649
fn cross_process() {
650650
let (server, name) = OsIpcOneShotServer::new().unwrap();
@@ -662,7 +662,7 @@ fn cross_process() {
662662
(data, vec![], vec![]));
663663
}
664664

665-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
665+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
666666
#[test]
667667
fn cross_process_sender_transfer() {
668668
let (server, name) = OsIpcOneShotServer::new().unwrap();

src/test.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// except according to those terms.
99

1010
use ipc::{self, IpcReceiverSet, IpcSender, IpcSharedMemory};
11-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
11+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
1212
use ipc::IpcReceiver;
1313
use router::ROUTER;
1414
use libc;
@@ -20,13 +20,13 @@ use std::sync::Arc;
2020
use std::sync::mpsc::{self, Sender};
2121
use std::thread;
2222

23-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
23+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
2424
use ipc::IpcOneShotServer;
2525

26-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
26+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
2727
use std::io::Error;
2828

29-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
29+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
3030
// I'm not actually sure invoking this is indeed unsafe -- but better safe than sorry...
3131
pub unsafe fn fork<F: FnOnce()>(child_func: F) -> libc::pid_t {
3232
match libc::fork() {
@@ -135,7 +135,7 @@ fn select() {
135135
}
136136
}
137137

138-
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android")))]
138+
#[cfg(not(any(feature = "force-inprocess", target_os = "windows", target_os = "android", target_os = "ios")))]
139139
#[test]
140140
fn cross_process_embedded_senders() {
141141
let person = ("Patrick Walton".to_owned(), 29);

0 commit comments

Comments
 (0)