rustc_target/spec/targets/
sparcv9_sun_solaris.rs

1use rustc_abi::Endian;
2
3use crate::spec::{Arch, Cc, LinkerFlavor, Target, TargetMetadata, TargetOptions, base};
4
5pub(crate) fn target() -> Target {
6    let mut base = TargetOptions {
7        endian: Endian::Big,
8        // llvm calls this "v9"
9        cpu: "v9".into(),
10        vendor: "sun".into(),
11        max_atomic_width: Some(64),
12        ..base::solaris::opts()
13    };
14    base.add_pre_link_args(LinkerFlavor::Unix(Cc::Yes), &["-m64"]);
15
16    Target {
17        llvm_target: "sparcv9-sun-solaris".into(),
18        metadata: TargetMetadata {
19            description: Some("SPARC Solaris 11.4".into()),
20            tier: Some(2),
21            host_tools: Some(true),
22            std: Some(true),
23        },
24        pointer_width: 64,
25        data_layout: "E-m:e-i64:64-i128:128-n32:64-S128".into(),
26        // Use "sparc64" instead of "sparcv9" here, since the former is already
27        // used widely in the source base. If we ever needed ABI
28        // differentiation from the sparc64, we could, but that would probably
29        // just be confusing.
30        arch: Arch::Sparc64,
31        options: base,
32    }
33}