]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs
New upstream version 1.53.0+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / x86_64_pc_windows_gnu.rs
CommitLineData
29967ef6 1use crate::spec::{LinkerFlavor, LldFlavor, Target};
1a4d82fc 2
29967ef6 3pub fn target() -> Target {
ba9703b0 4 let mut base = super::windows_gnu_base::opts();
85aaf69f 5 base.cpu = "x86-64".to_string();
cdc7bbd5 6 let gcc_pre_link_args = base.pre_link_args.entry(LinkerFlavor::Gcc).or_default();
fc512014
XL
7 gcc_pre_link_args.push("-m64".to_string());
8 // Use high-entropy 64 bit address space for ASLR
9 gcc_pre_link_args.push("-Wl,--high-entropy-va".to_string());
3dfed10e
XL
10 base.pre_link_args
11 .insert(LinkerFlavor::Lld(LldFlavor::Ld), vec!["-m".to_string(), "i386pep".to_string()]);
c30ab7b3 12 base.max_atomic_width = Some(64);
74b04a01 13 base.linker = Some("x86_64-w64-mingw32-gcc".to_string());
1a4d82fc 14
29967ef6 15 Target {
1a4d82fc 16 llvm_target: "x86_64-pc-windows-gnu".to_string(),
29967ef6 17 pointer_width: 64,
dfeec247
XL
18 data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
19 .to_string(),
1a4d82fc 20 arch: "x86_64".to_string(),
1a4d82fc 21 options: base,
29967ef6 22 }
1a4d82fc 23}