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:
kyeongwoon
2012-11-30 09:21:49 +09:00
committed by Brian Anderson
parent 27e6a0fa56
commit 987f824f23
35 changed files with 599 additions and 30 deletions

View File

@@ -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 = "";