1 use crate::spec::{cvs, LinkArgs, LinkerFlavor, TargetOptions};
3 pub fn opts() -> TargetOptions {
4 let pre_link_args = LinkArgs::from([(
7 // We cannot use `-nodefaultlibs` because compiler-rt has to be passed
8 // as a path since it's not added to linker search path by the default.
9 // There were attemts to make it behave like libgcc (so one can just use -l<name>)
10 // but LLVM maintainers rejected it: https://reviews.llvm.org/D51440
12 "--unwindlib=none".into(),
15 let late_link_args = LinkArgs::from([(
17 // Order of `late_link_args*` does not matter with LLD.
32 linker: Some("clang".into()),
33 dynamic_linking: true,
35 dll_prefix: "".into(),
36 dll_suffix: ".dll".into(),
37 exe_suffix: ".exe".into(),
38 families: cvs!["windows"],
39 is_like_windows: true,
40 allows_weak_linkage: false,
43 abi_return_struct_as_int: true,
44 emit_debug_gdb_scripts: false,
45 requires_uwtable: true,
46 eh_frame_header: false,
47 no_default_libraries: false,
48 has_thread_local: true,