]> git.lizzy.rs Git - rust.git/blob - src/librustc_back/target/windows_msvc_base.rs
Refactor away `inferred_obligations` from the trait selector
[rust.git] / src / librustc_back / target / windows_msvc_base.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 use LinkerFlavor;
12 use target::{LinkArgs, TargetOptions};
13 use std::default::Default;
14
15 pub fn opts() -> TargetOptions {
16     let mut args = LinkArgs::new();
17     args.insert(LinkerFlavor::Msvc,
18                 vec!["/NOLOGO".to_string(),
19                      "/NXCOMPAT".to_string()]);
20
21     TargetOptions {
22         function_sections: true,
23         linker: "link.exe".to_string(),
24         dynamic_linking: true,
25         executables: true,
26         dll_prefix: "".to_string(),
27         dll_suffix: ".dll".to_string(),
28         exe_suffix: ".exe".to_string(),
29         staticlib_prefix: "".to_string(),
30         staticlib_suffix: ".lib".to_string(),
31         target_family: Some("windows".to_string()),
32         is_like_windows: true,
33         is_like_msvc: true,
34         pre_link_args: args,
35         crt_static_allows_dylibs: true,
36         crt_static_respected: true,
37         abi_return_struct_as_int: true,
38
39         .. Default::default()
40     }
41 }