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:
commit
2b01a37ec3
50 changed files with 773 additions and 150 deletions
|
|
@ -26,6 +26,9 @@ mod hello;
|
|||
#[cfg(target_os = "dragonfly")]
|
||||
mod hello;
|
||||
|
||||
#[cfg(target_os = "bitrig")]
|
||||
mod hello;
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
mod hello;
|
||||
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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 {}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
//ignore-freebsd
|
||||
//ignore-ios
|
||||
//ignore-dragonfly
|
||||
//ignore-bitrig
|
||||
|
||||
#![feature(asm)]
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
//ignore-freebsd
|
||||
//ignore-ios
|
||||
//ignore-dragonfly
|
||||
//ignore-bitrig
|
||||
|
||||
#![feature(asm)]
|
||||
|
||||
|
|
|
|||
|
|
@ -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")]
|
||||
|
|
|
|||
|
|
@ -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() { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue