Auto merge of #21959 - dhuseby:bitrig-support, r=brson

This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
This commit is contained in:
bors 2015-02-21 09:20:48 +00:00
commit 2b01a37ec3
50 changed files with 773 additions and 150 deletions

View file

@ -26,6 +26,9 @@ mod hello;
#[cfg(target_os = "dragonfly")]
mod hello;
#[cfg(target_os = "bitrig")]
mod hello;
#[cfg(target_os = "android")]
mod hello;

View file

@ -42,6 +42,18 @@ mod m {
}
}
#[cfg(target_os = "bitrig")]
mod m {
#[main]
#[cfg(target_arch = "x86_64")]
pub fn main() {
unsafe {
assert_eq!(::rusti::pref_align_of::<u64>(), 8u);
assert_eq!(::rusti::min_align_of::<u64>(), 8u);
}
}
}
#[cfg(target_os = "windows")]
mod m {
#[main]

View file

@ -37,7 +37,7 @@ extern {}
#[link(name = "c")]
extern {}
#[cfg(target_os = "openbsd")]
#[cfg(any(target_os = "bitrig", target_os = "openbsd"))]
#[link(name = "c")]
extern {}

View file

@ -12,6 +12,7 @@
//ignore-freebsd
//ignore-ios
//ignore-dragonfly
//ignore-bitrig
#![feature(asm)]

View file

@ -13,6 +13,7 @@
//ignore-freebsd
//ignore-ios
//ignore-dragonfly
//ignore-bitrig
#![feature(asm)]

View file

@ -55,6 +55,15 @@ mod m {
}
}
#[cfg(target_os = "bitrig")]
mod m {
#[cfg(target_arch = "x86_64")]
pub mod m {
pub fn align() -> uint { 8u }
pub fn size() -> uint { 16u }
}
}
#[cfg(target_os = "windows")]
mod m {
#[cfg(target_arch = "x86")]

View file

@ -34,6 +34,7 @@ pub fn main() {
target_os = "linux",
target_os = "freebsd",
target_os = "dragonfly",
target_os = "bitrig",
target_os = "openbsd",
target_os = "android"))]
pub fn main() { }