1 use crate::spec::{cvs, LinkerFlavor, TargetOptions};
3 pub fn opts() -> TargetOptions {
4 // We cannot use `-nodefaultlibs` because compiler-rt has to be passed
5 // as a path since it's not added to linker search path by the default.
6 // There were attempts to make it behave like libgcc (so one can just use -l<name>)
7 // but LLVM maintainers rejected it: https://reviews.llvm.org/D51440
9 TargetOptions::link_args(LinkerFlavor::Gcc, &["-nolibc", "--unwindlib=none"]);
10 // Order of `late_link_args*` does not matter with LLD.
11 let late_link_args = TargetOptions::link_args(
13 &["-lmingw32", "-lmingwex", "-lmsvcrt", "-lkernel32", "-luser32"],
21 linker: Some("clang".into()),
22 dynamic_linking: true,
23 dll_prefix: "".into(),
24 dll_suffix: ".dll".into(),
25 exe_suffix: ".exe".into(),
26 families: cvs!["windows"],
27 is_like_windows: true,
28 allows_weak_linkage: false,
31 abi_return_struct_as_int: true,
32 emit_debug_gdb_scripts: false,
33 requires_uwtable: true,
34 eh_frame_header: false,
35 no_default_libraries: false,
36 has_thread_local: true,