mirror of
https://github.com/openharmony/third_party_rust_rustix.git
synced 2026-07-19 14:53:33 -04:00
Detect arm64-ilp32 just enough to say that it's not supported.
arm64-ilp32 is a 32-bit ABI on a 64-bit platform, just like x32 is a 32-bit abi on x86-64.
This commit is contained in:
@@ -26,7 +26,9 @@ fn main() {
|
||||
let arch = var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||
let asm_name = format!("{}/{}.s", OUTLINE_PATH, arch);
|
||||
let os_name = var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
let is_x32 = arch == "x86_64" && var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap() == "32";
|
||||
let pointer_width = var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap();
|
||||
let is_x32 = arch == "x86_64" && pointer_width == "32";
|
||||
let is_arm64_ilp32 = arch == "aarch64" && pointer_width == "32";
|
||||
println!("cargo:rerun-if-env-changed=CARGO_CFG_TARGET_ARCH");
|
||||
|
||||
// If rustix_use_libc is set, or if we're on an architecture/OS that doesn't
|
||||
@@ -35,6 +37,7 @@ fn main() {
|
||||
|| os_name != "linux"
|
||||
|| std::fs::metadata(&asm_name).is_err()
|
||||
|| is_x32
|
||||
|| is_arm64_ilp32
|
||||
{
|
||||
use_feature("libc");
|
||||
} else {
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
use crate::imp::reg::{ArgReg, FromAsm, RetReg, SyscallNumber, ToAsm, A0, A1, A2, A3, A4, A5, R0};
|
||||
use core::arch::asm;
|
||||
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
compile_error!("arm64-ilp32 is not supported yet");
|
||||
|
||||
#[inline]
|
||||
#[must_use]
|
||||
pub(in crate::imp) unsafe fn syscall0_readonly(nr: SyscallNumber<'_>) -> RetReg<R0> {
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
//
|
||||
// outline.rs takes care of reordering the nr argument to the end for us,
|
||||
// so we only need to move nr into w8.
|
||||
//
|
||||
// arm64-ilp32 is not yet supported.
|
||||
|
||||
.file "aarch64.s"
|
||||
.arch armv8-a
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user