rustc_target/spec/targets/
x86_64_unknown_netbsd.rs
1use crate::spec::{
2 Cc, LinkerFlavor, Lld, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions,
3 base,
4};
5
6pub(crate) fn target() -> Target {
7 let mut base = base::netbsd::opts();
8 base.cpu = "x86-64".into();
9 base.plt_by_default = false;
10 base.max_atomic_width = Some(64);
11 base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
12 base.stack_probes = StackProbeType::Inline;
13 base.supported_sanitizers = SanitizerSet::ADDRESS
14 | SanitizerSet::CFI
15 | SanitizerSet::LEAK
16 | SanitizerSet::MEMORY
17 | SanitizerSet::THREAD;
18 base.supports_xray = true;
19
20 Target {
21 llvm_target: "x86_64-unknown-netbsd".into(),
22 metadata: TargetMetadata {
23 description: Some("NetBSD/amd64".into()),
24 tier: Some(2),
25 host_tools: Some(true),
26 std: Some(true),
27 },
28 pointer_width: 64,
29 data_layout:
30 "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
31 arch: "x86_64".into(),
32 options: TargetOptions { mcount: "__mcount".into(), ..base },
33 }
34}