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.)
This commit is contained in:
Josh Triplett 2021-09-19 12:33:21 -07:00 committed by Mike Leany
parent 6ab66192f9
commit 2037cee701

View File

@ -8,6 +8,14 @@ use super::{CodeModel, LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOpt
pub fn target() -> Target {
let opts = TargetOptions {
cpu: "x86-64".to_string(),
max_atomic_width: Some(64),
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
stack_probes: StackProbeType::Call,
position_independent_executables: true,
static_position_independent_executables: true,
relro_level: RelroLevel::Full,
relocation_model: RelocModel::Static,
linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
linker: Some("rust-lld".to_owned()),
features: