mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Apply suggestions
This commit is contained in:
parent
f94ada13de
commit
33d0f386f6
@ -4,14 +4,10 @@ use crate::spec::{Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOp
|
||||
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let mut pre_link_args = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &[
|
||||
// FIXME: Disable ASLR for now to fix relocation error
|
||||
"--disable-dynamicbase",
|
||||
"--enable-auto-image-base",
|
||||
]);
|
||||
crate::spec::add_link_args(&mut pre_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[
|
||||
// Tell GCC to avoid linker plugins, because we are not bundling
|
||||
// them with Windows installer, and Rust does its own LTO anyways.
|
||||
"-fno-use-linker-plugin",
|
||||
"-Wl,--disable-dynamicbase",
|
||||
"-Wl,--enable-auto-image-base",
|
||||
]);
|
||||
@ -42,9 +38,7 @@ pub(crate) fn opts() -> TargetOptions {
|
||||
emit_debug_gdb_scripts: false,
|
||||
requires_uwtable: true,
|
||||
eh_frame_header: false,
|
||||
// FIXME(davidtwco): Support Split DWARF on Cygwin - may require LLVM changes to
|
||||
// output DWO, despite using DWARF, doesn't use ELF..
|
||||
debuginfo_kind: DebuginfoKind::Pdb,
|
||||
debuginfo_kind: DebuginfoKind::Dwarf,
|
||||
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
|
||||
..Default::default()
|
||||
}
|
||||
|
@ -3,16 +3,8 @@ use crate::spec::{Cc, LinkerFlavor, Lld, Target, base};
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::cygwin::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
// FIXME: Disable ASLR for now to fix relocation error
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &[
|
||||
"-m",
|
||||
"i386pep",
|
||||
"--disable-high-entropy-va",
|
||||
]);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[
|
||||
"-m64",
|
||||
"-Wl,--disable-high-entropy-va",
|
||||
]);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &["-m", "i386pep"]);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
|
||||
base.max_atomic_width = Some(64);
|
||||
base.linker = Some("x86_64-pc-cygwin-gcc".into());
|
||||
Target {
|
||||
@ -26,7 +18,7 @@ pub(crate) fn target() -> Target {
|
||||
description: Some("64-bit x86 Cygwin".into()),
|
||||
tier: Some(3),
|
||||
host_tools: Some(false),
|
||||
std: Some(true),
|
||||
std: None,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user