rustc-ap-rustc_target 587.0.0

Automatically published version of the package `rustc_target` in the rust-lang/rust repository from commit 74d5c70b174f06843049af2d764ff57ddc81c81c The publishing script for this crate lives at: https://github.com/alexcrichton/rustc-auto-publish
Documentation
use crate::spec::{LinkArgs, LinkerFlavor, PanicStrategy, RelroLevel, TargetOptions};
use std::default::Default;

pub fn opts() -> TargetOptions {
    let mut pre_link_args = LinkArgs::new();
    pre_link_args.insert(
        LinkerFlavor::Gcc,
        vec!["-Wl,--as-needed".to_string(), "-Wl,-z,noexecstack".to_string()],
    );

    TargetOptions {
        disable_redzone: true,
        panic_strategy: PanicStrategy::Abort,
        stack_probes: true,
        eliminate_frame_pointer: false,
        linker_is_gnu: true,
        position_independent_executables: true,
        needs_plt: true,
        relro_level: RelroLevel::Full,
        relocation_model: "static".to_string(),
        target_family: Some("unix".to_string()),
        pre_link_args,

        ..Default::default()
    }
}