rustc_target/spec/targets/
hexagon_unknown_qurt.rs

1use crate::spec::{Arch, Cc, LinkerFlavor, Lld, Os, Target, TargetMetadata, TargetOptions, cvs};
2
3pub(crate) fn target() -> Target {
4    let mut base = TargetOptions::default();
5    base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &["-G0"]);
6
7    Target {
8        llvm_target: "hexagon-unknown-elf".into(),
9        metadata: TargetMetadata {
10            description: Some("Hexagon QuRT".into()),
11            tier: Some(3),
12            host_tools: Some(false),
13            std: Some(false),
14        },
15        pointer_width: 32,
16        data_layout: "\
17            e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32\
18            :32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32\
19            :32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048\
20            :2048:2048"
21            .into(),
22        arch: Arch::Hexagon,
23        options: TargetOptions {
24            os: Os::Qurt,
25            vendor: "unknown".into(),
26            cpu: "hexagonv69".into(),
27            linker: Some("rust-lld".into()),
28            linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
29            exe_suffix: ".elf".into(),
30            dynamic_linking: true,
31            executables: true,
32            families: cvs!["unix"],
33            has_thread_local: true,
34            has_rpath: false,
35            crt_static_default: false,
36            crt_static_respected: true,
37            crt_static_allows_dylibs: true,
38            no_default_libraries: false,
39            max_atomic_width: Some(32),
40            features: "-small-data,+hvx-length128b".into(),
41            c_enum_min_bits: Some(8),
42            ..base
43        },
44    }
45}