summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/spec/linux_kernel_base.rs
blob: f41533a9548fe459aa0431e94a78ca210541d4af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::spec::TargetOptions;
use crate::spec::{FramePointer, PanicStrategy, RelocModel, RelroLevel, StackProbeType};

pub fn opts() -> TargetOptions {
    TargetOptions {
        env: "gnu".into(),
        disable_redzone: true,
        panic_strategy: PanicStrategy::Abort,
        stack_probes: StackProbeType::X86,
        frame_pointer: FramePointer::Always,
        position_independent_executables: true,
        needs_plt: true,
        relro_level: RelroLevel::Full,
        relocation_model: RelocModel::Static,

        ..Default::default()
    }
}