1 use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions};
2 use std::default::Default;
4 pub fn opts() -> TargetOptions {
5 let mut late_link_args = LinkArgs::new();
9 // LLVM will insert calls to the stack protector functions
10 // "__stack_chk_fail" and "__stack_chk_guard" into code in native
11 // object files. Some platforms include these symbols directly in
12 // libc, but at least historically these have been provided in
13 // libssp.so on illumos and Solaris systems.
19 os: "illumos".to_string(),
20 dynamic_linking: true,
23 os_family: Some("unix".to_string()),
24 is_like_solaris: true,
25 limit_rdylib_exports: false, // Linker doesn't support this
26 eliminate_frame_pointer: false,
27 eh_frame_header: false,
30 // While we support ELF TLS, rust requires a way to register
31 // cleanup handlers (in C, this would be something along the lines of:
32 // void register_callback(void (*fn)(void *), void *arg);
33 // (see src/libstd/sys/unix/fast_thread_local.rs) that is currently
34 // missing in illumos. For now at least, we must fallback to using
35 // pthread_{get,set}specific.
38 // FIXME: Currently, rust is invoking cc to link, which ends up
39 // causing these to get included twice. We should eventually transition
40 // to having rustc invoke ld directly, in which case these will need to
43 // We want XPG6 behavior from libc and libm. See standards(5)
44 //pre_link_objects_exe: vec![
45 // "/usr/lib/amd64/values-Xc.o".to_string(),
46 // "/usr/lib/amd64/values-xpg6.o".to_string(),