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:
parent
6ab66192f9
commit
2037cee701
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,14 @@ use super::{CodeModel, LinkerFlavor, LldFlavor, PanicStrategy, Target, TargetOpt
|
||||||
|
|
||||||
pub fn target() -> Target {
|
pub fn target() -> Target {
|
||||||
let opts = TargetOptions {
|
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_flavor: LinkerFlavor::Lld(LldFlavor::Ld),
|
||||||
linker: Some("rust-lld".to_owned()),
|
linker: Some("rust-lld".to_owned()),
|
||||||
features:
|
features:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue