]> git.proxmox.com Git - rustc.git/blame - src/librustc_back/target/windows_msvc_base.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / librustc_back / target / windows_msvc_base.rs
CommitLineData
62682a34
SL
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
cc61c64b
XL
11use LinkerFlavor;
12use target::{LinkArgs, TargetOptions};
62682a34
SL
13use std::default::Default;
14
15pub fn opts() -> TargetOptions {
cc61c64b
XL
16 let mut args = LinkArgs::new();
17 args.insert(LinkerFlavor::Msvc,
18 vec!["/NOLOGO".to_string(),
19 "/NXCOMPAT".to_string()]);
20
62682a34
SL
21 TargetOptions {
22 function_sections: true,
23 linker: "link.exe".to_string(),
62682a34
SL
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(),
32a655c1 31 target_family: Some("windows".to_string()),
62682a34
SL
32 is_like_windows: true,
33 is_like_msvc: true,
cc61c64b 34 pre_link_args: args,
3b2f2976
XL
35 crt_static_allows_dylibs: true,
36 crt_static_respected: true,
62682a34
SL
37
38 .. Default::default()
39 }
40}