Skip to content

Commit 2037cee

Browse files
joshtriplettmikeleany
authored andcommitted
x86_64-unknown-none: Expand TargetOptions to specify more details
Specify the `cpu` and the `max_atomic_width` (64). Set `stack_probes` similarly to other targets to work around known issues, and copy the corresponding comment from those targets. Build position-independent code that doesn't require relocations. (Work on this target sponsored by Profian.)
1 parent 6ab6619 commit 2037cee

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler/rustc_target/src/spec/x86_64_unknown_none.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ use super::{CodeModel, LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOpt
88

99
pub fn target() -> Target {
1010
let opts = TargetOptions {
11+
cpu: "x86-64".to_string(),
12+
max_atomic_width: Some(64),
13+
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
14+
stack_probes: StackProbeType::Call,
15+
position_independent_executables: true,
16+
static_position_independent_executables: true,
17+
relro_level: RelroLevel::Full,
18+
relocation_model: RelocModel::Static,
1119
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
1220
linker: Some("rust-lld".to_owned()),
1321
features:

0 commit comments

Comments
 (0)