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,
7 vec!["/NOLOGO".to_string(),
8 "/NXCOMPAT".to_string()]);
11 function_sections: true,
12 dynamic_linking: true,
14 dll_prefix: String::new(),
15 dll_suffix: ".dll".to_string(),
16 exe_suffix: ".exe".to_string(),
17 staticlib_prefix: String::new(),
18 staticlib_suffix: ".lib".to_string(),
19 target_family: Some("windows".to_string()),
20 is_like_windows: true,
22 // set VSLANG to 1033 can prevent link.exe from using
23 // language packs, and avoid generating Non-UTF-8 error
24 // messages if a link error occurred.
25 link_env: vec![("VSLANG".to_string(), "1033".to_string())],
27 crt_static_allows_dylibs: true,
28 crt_static_respected: true,
29 abi_return_struct_as_int: true,
30 emit_debug_gdb_scripts: false,
31 requires_uwtable: true,