|
| 1 | +use crate::spec::{Cc, LinkerFlavor, Lld, RelocModel, StackProbeType, Target, TargetOptions, cvs}; |
| 2 | + |
| 3 | +pub(crate) fn target() -> Target { |
| 4 | + let mut base = TargetOptions { |
| 5 | + os: "nuttx".into(), |
| 6 | + dynamic_linking: false, |
| 7 | + families: cvs!["unix"], |
| 8 | + no_default_libraries: true, |
| 9 | + has_rpath: false, |
| 10 | + position_independent_executables: false, |
| 11 | + relocation_model: RelocModel::Static, |
| 12 | + relro_level: crate::spec::RelroLevel::Full, |
| 13 | + has_thread_local: true, |
| 14 | + use_ctors_section: true, |
| 15 | + ..Default::default() |
| 16 | + }; |
| 17 | + base.cpu = "pentium4".into(); |
| 18 | + base.max_atomic_width = Some(64); |
| 19 | + base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]); |
| 20 | + base.stack_probes = StackProbeType::Inline; |
| 21 | + |
| 22 | + Target { |
| 23 | + llvm_target: "i686-unknown-nuttx".into(), |
| 24 | + metadata: crate::spec::TargetMetadata { |
| 25 | + description: Some("NuttX/x86".into()), |
| 26 | + tier: Some(3), |
| 27 | + host_tools: Some(false), |
| 28 | + std: Some(true), |
| 29 | + }, |
| 30 | + pointer_width: 32, |
| 31 | + data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ |
| 32 | + i128:128-f64:32:64-f80:32-n8:16:32-S128" |
| 33 | + .into(), |
| 34 | + arch: "x86".into(), |
| 35 | + options: base, |
| 36 | + } |
| 37 | +} |
0 commit comments