summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/spec/linux_musl_base.rs
blob: 61553e71b4500ae4dea3910a6910bf57e9524bf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::spec::crt_objects::{self, LinkSelfContainedDefault};
use crate::spec::TargetOptions;

pub fn opts() -> TargetOptions {
    let mut base = super::linux_base::opts();

    base.env = "musl".into();
    base.pre_link_objects_self_contained = crt_objects::pre_musl_self_contained();
    base.post_link_objects_self_contained = crt_objects::post_musl_self_contained();
    base.link_self_contained = LinkSelfContainedDefault::Musl;

    // These targets statically link libc by default
    base.crt_static_default = true;

    base
}