Support ARM and Android
Conflicts: src/libcore/os.rs src/librustc/back/link.rs src/librustc/driver/driver.rs src/librustc/metadata/loader.rs src/librustc/middle/trans/base.rs
This commit is contained in:
parent
27e6a0fa56
commit
987f824f23
35 changed files with 599 additions and 30 deletions
|
|
@ -1291,6 +1291,7 @@ pub mod test {
|
|||
#[cfg(target_os="win32")]
|
||||
#[cfg(target_os="darwin")]
|
||||
#[cfg(target_os="linux")]
|
||||
#[cfg(target_os="android")]
|
||||
pub mod tcp_ipv4_server_and_client_test {
|
||||
#[cfg(target_arch="x86_64")]
|
||||
pub mod impl64 {
|
||||
|
|
@ -1329,6 +1330,7 @@ pub mod test {
|
|||
}
|
||||
}
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub mod impl32 {
|
||||
use net::tcp::test::*;
|
||||
|
||||
|
|
|
|||
|
|
@ -109,6 +109,7 @@ pub type uv_tcp_t_32bit_unix_riders = {
|
|||
a29: *u8
|
||||
};
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub type uv_tcp_t_32bit_unix_riders = {
|
||||
a29: *u8, a30: *u8, a31: *u8,
|
||||
a32: *u8, a33: *u8, a34: *u8,
|
||||
|
|
@ -165,6 +166,7 @@ pub type uv_write_t_32bit_unix_riders = {
|
|||
a13: *u8
|
||||
};
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub type uv_write_t_32bit_unix_riders = {
|
||||
a13: *u8, a14: *u8
|
||||
};
|
||||
|
|
@ -192,6 +194,7 @@ pub type uv_async_t_32bit_unix_riders = {
|
|||
a10: *u8
|
||||
};
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub type uv_async_t_32bit_unix_riders = {
|
||||
a10: *u8, a11: *u8, a12: *u8, a13: *u8
|
||||
};
|
||||
|
|
@ -220,6 +223,7 @@ pub type uv_timer_t_32bit_unix_riders = {
|
|||
a10: *u8, a11: *u8
|
||||
};
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub type uv_timer_t_32bit_unix_riders = {
|
||||
a10: *u8, a11: *u8, a12: *u8, a13: *u8,
|
||||
a14: *u8, a15: *u8, a16: *u8
|
||||
|
|
@ -249,6 +253,7 @@ pub type sockaddr_in6 = {
|
|||
a2: *u8, a3: *u8
|
||||
};
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub type sockaddr_in6 = {
|
||||
a0: *u8, a1: *u8,
|
||||
a2: *u8, a3: *u8,
|
||||
|
|
@ -267,6 +272,7 @@ pub mod addr_in_impl {
|
|||
a2: *u8, a3: *u8
|
||||
};
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub type addr_in = {
|
||||
a0: *u8, a1: *u8,
|
||||
a2: *u8, a3: *u8,
|
||||
|
|
@ -285,6 +291,7 @@ pub mod addr_in_impl {
|
|||
// unix size: 48, 32bit: 32
|
||||
pub type addrinfo = addrinfo_impl::addrinfo;
|
||||
#[cfg(target_os="linux")]
|
||||
#[cfg(target_os="android")]
|
||||
pub mod addrinfo_impl {
|
||||
#[cfg(target_arch="x86_64")]
|
||||
pub type addrinfo = {
|
||||
|
|
@ -292,6 +299,7 @@ pub mod addrinfo_impl {
|
|||
a04: *u8, a05: *u8
|
||||
};
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub type addrinfo = {
|
||||
a00: *u8, a01: *u8, a02: *u8, a03: *u8,
|
||||
a04: *u8, a05: *u8, a06: *u8, a07: *u8
|
||||
|
|
@ -328,6 +336,7 @@ pub mod uv_ll_struct_stubgen {
|
|||
pub fn gen_stub_uv_tcp_t() -> uv_tcp_t {
|
||||
return gen_stub_os();
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "android")]
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
pub fn gen_stub_os() -> uv_tcp_t {
|
||||
|
|
@ -358,6 +367,7 @@ pub mod uv_ll_struct_stubgen {
|
|||
};
|
||||
}
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub fn gen_stub_arch() -> uv_tcp_t {
|
||||
return { fields: { loop_handle: ptr::null(), type_: 0u32,
|
||||
close_cb: ptr::null(),
|
||||
|
|
@ -443,6 +453,7 @@ pub mod uv_ll_struct_stubgen {
|
|||
};
|
||||
}
|
||||
#[cfg(target_arch = "x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub fn gen_stub_arch() -> uv_async_t {
|
||||
return { fields: { loop_handle: ptr::null(), type_: 0u32,
|
||||
close_cb: ptr::null(),
|
||||
|
|
@ -492,6 +503,7 @@ pub mod uv_ll_struct_stubgen {
|
|||
};
|
||||
}
|
||||
#[cfg(target_arch = "x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub fn gen_stub_arch() -> uv_timer_t {
|
||||
return { fields: { loop_handle: ptr::null(), type_: 0u32,
|
||||
close_cb: ptr::null(),
|
||||
|
|
@ -541,6 +553,7 @@ pub mod uv_ll_struct_stubgen {
|
|||
};
|
||||
}
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub fn gen_stub_arch() -> uv_write_t {
|
||||
return { fields: { loop_handle: ptr::null(), type_: 0u32,
|
||||
close_cb: ptr::null(),
|
||||
|
|
@ -1571,6 +1584,7 @@ pub mod test {
|
|||
#[cfg(target_os="win32")]
|
||||
#[cfg(target_os="darwin")]
|
||||
#[cfg(target_os="linux")]
|
||||
#[cfg(target_os="android")]
|
||||
pub mod tcp_and_server_client_test {
|
||||
#[cfg(target_arch="x86_64")]
|
||||
pub mod impl64 {
|
||||
|
|
@ -1581,6 +1595,7 @@ pub mod test {
|
|||
}
|
||||
}
|
||||
#[cfg(target_arch="x86")]
|
||||
#[cfg(target_arch="arm")]
|
||||
pub mod impl32 {
|
||||
use uv_ll::test::*;
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue