Skip to content

Commit 33d0f38

Browse files
committed
Apply suggestions
1 parent f94ada1 commit 33d0f38

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

Diff for: compiler/rustc_target/src/spec/base/cygwin.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ use crate::spec::{Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOp
44

55
pub(crate) fn opts() -> TargetOptions {
66
let mut pre_link_args = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &[
7-
// FIXME: Disable ASLR for now to fix relocation error
87
"--disable-dynamicbase",
98
"--enable-auto-image-base",
109
]);
1110
crate::spec::add_link_args(&mut pre_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[
12-
// Tell GCC to avoid linker plugins, because we are not bundling
13-
// them with Windows installer, and Rust does its own LTO anyways.
14-
"-fno-use-linker-plugin",
1511
"-Wl,--disable-dynamicbase",
1612
"-Wl,--enable-auto-image-base",
1713
]);
@@ -42,9 +38,7 @@ pub(crate) fn opts() -> TargetOptions {
4238
emit_debug_gdb_scripts: false,
4339
requires_uwtable: true,
4440
eh_frame_header: false,
45-
// FIXME(davidtwco): Support Split DWARF on Cygwin - may require LLVM changes to
46-
// output DWO, despite using DWARF, doesn't use ELF..
47-
debuginfo_kind: DebuginfoKind::Pdb,
41+
debuginfo_kind: DebuginfoKind::Dwarf,
4842
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
4943
..Default::default()
5044
}

Diff for: compiler/rustc_target/src/spec/targets/x86_64_pc_cygwin.rs

+3-11
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,8 @@ use crate::spec::{Cc, LinkerFlavor, Lld, Target, base};
33
pub(crate) fn target() -> Target {
44
let mut base = base::cygwin::opts();
55
base.cpu = "x86-64".into();
6-
// FIXME: Disable ASLR for now to fix relocation error
7-
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &[
8-
"-m",
9-
"i386pep",
10-
"--disable-high-entropy-va",
11-
]);
12-
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[
13-
"-m64",
14-
"-Wl,--disable-high-entropy-va",
15-
]);
6+
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &["-m", "i386pep"]);
7+
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
168
base.max_atomic_width = Some(64);
179
base.linker = Some("x86_64-pc-cygwin-gcc".into());
1810
Target {
@@ -26,7 +18,7 @@ pub(crate) fn target() -> Target {
2618
description: Some("64-bit x86 Cygwin".into()),
2719
tier: Some(3),
2820
host_tools: Some(false),
29-
std: Some(true),
21+
std: None,
3022
},
3123
}
3224
}

0 commit comments

Comments
 (0)