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:
committed by
Brian Anderson
parent
27e6a0fa56
commit
987f824f23
@@ -325,6 +325,7 @@ pub fn fsync_fd(fd: c_int, _level: io::fsync::Level) -> c_int {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn fsync_fd(fd: c_int, level: io::fsync::Level) -> c_int {
|
||||
unsafe {
|
||||
use libc::funcs::posix01::unistd::*;
|
||||
@@ -449,6 +450,7 @@ pub fn self_exe_path() -> Option<Path> {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "android")]
|
||||
fn load_self() -> Option<~str> {
|
||||
unsafe {
|
||||
use libc::funcs::posix01::unistd::readlink;
|
||||
@@ -876,6 +878,7 @@ pub fn real_args() -> ~[~str] {
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(target_os = "android")]
|
||||
#[cfg(target_os = "freebsd")]
|
||||
pub fn real_args() -> ~[~str] {
|
||||
unsafe {
|
||||
@@ -976,7 +979,6 @@ pub mod consts {
|
||||
pub const FAMILY: &str = "windows";
|
||||
}
|
||||
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
use os::consts::macos::*;
|
||||
|
||||
@@ -986,6 +988,9 @@ pub mod consts {
|
||||
#[cfg(target_os = "linux")]
|
||||
use os::consts::linux::*;
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
use os::consts::android::*;
|
||||
|
||||
#[cfg(target_os = "win32")]
|
||||
use os::consts::win32::*;
|
||||
|
||||
@@ -1010,6 +1015,13 @@ pub mod consts {
|
||||
pub const EXE_SUFFIX: &str = "";
|
||||
}
|
||||
|
||||
pub mod android {
|
||||
pub const SYSNAME: &str = "android";
|
||||
pub const DLL_PREFIX: &str = "lib";
|
||||
pub const DLL_SUFFIX: &str = ".so";
|
||||
pub const EXE_SUFFIX: &str = "";
|
||||
}
|
||||
|
||||
pub mod win32 {
|
||||
pub const SYSNAME: &str = "win32";
|
||||
pub const DLL_PREFIX: &str = "";
|
||||
|
||||
Reference in New Issue
Block a user