Make 3 run-pass tests works on android (aarch64 and x86)
This commit is contained in:
parent
4e3901d35f
commit
c199cb5370
3 changed files with 5 additions and 24 deletions
|
@ -19,7 +19,8 @@ mod rusti {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "cloudabi",
|
||||
#[cfg(any(target_os = "android",
|
||||
target_os = "cloudabi",
|
||||
target_os = "dragonfly",
|
||||
target_os = "emscripten",
|
||||
target_os = "freebsd",
|
||||
|
@ -80,15 +81,3 @@ mod m {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
mod m {
|
||||
#[main]
|
||||
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
assert_eq!(::rusti::pref_align_of::<u64>(), 8);
|
||||
assert_eq!(::rusti::min_align_of::<u64>(), 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,8 @@ struct Outer {
|
|||
}
|
||||
|
||||
|
||||
#[cfg(any(target_os = "cloudabi",
|
||||
#[cfg(any(target_os = "android",
|
||||
target_os = "cloudabi",
|
||||
target_os = "dragonfly",
|
||||
target_os = "emscripten",
|
||||
target_os = "freebsd",
|
||||
|
@ -85,15 +86,6 @@ mod m {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
mod m {
|
||||
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
|
||||
pub mod m {
|
||||
pub fn align() -> usize { 8 }
|
||||
pub fn size() -> usize { 16 }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
unsafe {
|
||||
let x = Outer {c8: 22, t: Inner {c64: 44}};
|
||||
|
|
|
@ -35,7 +35,7 @@ fn main() {
|
|||
unsafe {
|
||||
// Install signal hander that runs on alternate signal stack.
|
||||
let mut action: sigaction = std::mem::zeroed();
|
||||
action.sa_flags = SA_SIGINFO | SA_ONSTACK;
|
||||
action.sa_flags = (SA_ONSTACK | SA_SIGINFO) as _;
|
||||
action.sa_sigaction = signal_handler as sighandler_t;
|
||||
sigaction(SIGWINCH, &action, std::ptr::null_mut());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue