1 use crate::spec::{LinkArgs, LinkerFlavor, TargetOptions};
2 use std::default::Default;
4 pub fn opts() -> TargetOptions {
5 let mut args = LinkArgs::new();
6 args.insert(LinkerFlavor::Msvc, vec!["/NOLOGO".to_string(), "/NXCOMPAT".to_string()]);
9 function_sections: true,
10 dynamic_linking: true,
12 dll_prefix: String::new(),
13 dll_suffix: ".dll".to_string(),
14 exe_suffix: ".exe".to_string(),
15 staticlib_prefix: String::new(),
16 staticlib_suffix: ".lib".to_string(),
17 target_family: Some("windows".to_string()),
18 is_like_windows: true,
20 // set VSLANG to 1033 can prevent link.exe from using
21 // language packs, and avoid generating Non-UTF-8 error
22 // messages if a link error occurred.
23 link_env: vec![("VSLANG".to_string(), "1033".to_string())],
25 crt_static_allows_dylibs: true,
26 crt_static_respected: true,
27 abi_return_struct_as_int: true,
28 emit_debug_gdb_scripts: false,
29 requires_uwtable: true,