tools/rust: Move NuttX Rust target specs into nuttx

Move the NuttX-specific Rust target specification files from apps/tools
to nuttx/tools so files with the same purpose are kept in one place.

The existing aarch64 Mach-O target spec for macOS simulator builds
already lives under nuttx/tools. Keeping the remaining NuttX Rust target
specs there as well makes the layout consistent and lets both Make and
CMake builds refer to target specs from the NuttX tree.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
This commit is contained in:
Shoji Tokunaga 2026-05-31 17:37:58 +09:00 committed by Xiang Xiao
parent bc3a2596c8
commit 3d446bd674
3 changed files with 111 additions and 0 deletions

View file

@ -0,0 +1,42 @@
{
"arch": "aarch64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32",
"default-uwtable": true,
"disable-redzone": true,
"features": "+v8a,+strict-align,+neon",
"linker": "rust-lld",
"linker-flavor": "gnu-lld",
"llvm-target": "aarch64-unknown-nuttx",
"max-atomic-width": 128,
"metadata": {
"description": "aarch64 target for NuttX RTOS",
"host_tools": false,
"std": true,
"tier": 3
},
"os": "nuttx",
"panic-strategy": "abort",
"pre-link-args": {
"gnu": [
"--fix-cortex-a53-843419"
],
"gnu-lld": [
"--fix-cortex-a53-843419"
]
},
"relocation-model": "static",
"stack-probes": {
"kind": "inline"
},
"supported-sanitizers": [
"kcfi",
"kernel-address",
"kernel-hwaddress"
],
"supports-xray": true,
"target-family": [
"unix"
],
"target-pointer-width": 64
}

View file

@ -0,0 +1,33 @@
{
"arch": "x86",
"cpu": "i486",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128",
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float",
"default-dwarf-version": 2,
"dynamic-linking": true,
"has-rpath": true,
"has-thread-local": true,
"linker-flavor": "gnu-lld",
"llvm-target": "i486-unknown-nuttx",
"max-atomic-width": 64,
"metadata": {
"description": "32-bit x86, resricted to i486",
"host_tools": false,
"std": true,
"tier": 3
},
"no-default-libraries": true,
"os": "nuttx",
"position-independent-executables": false,
"relro-level": "full",
"rustc-abi": "x86-softfloat",
"stack-probes": {
"kind": "inline"
},
"target-family": [
"unix"
],
"target-mcount": "__mcount",
"target-pointer-width": 32
}

View file

@ -0,0 +1,36 @@
{
"arch": "x86_64",
"cpu": "x86-64",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128",
"disable-redzone": true,
"features": "-mmx,-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2,+soft-float",
"linker": "rust-lld",
"linker-flavor": "gnu-lld",
"llvm-target": "x86_64-unknown-nuttx",
"max-atomic-width": 64,
"metadata": {
"description": "x86_64 target for NuttX RTOS with softfloat",
"host_tools": false,
"std": true,
"tier": 3
},
"panic-strategy": "abort",
"plt-by-default": false,
"position-independent-executables": true,
"relro-level": "full",
"rustc-abi": "x86-softfloat",
"stack-probes": {
"kind": "inline"
},
"static-position-independent-executables": true,
"supported-sanitizers": [
"kcfi",
"kernel-address"
],
"os": "nuttx",
"target-family": [
"unix"
],
"target-pointer-width": 64
}