Apply suggestions
This commit is contained in:
parent
f94ada13de
commit
33d0f386f6
2 changed files with 4 additions and 18 deletions
|
@ -4,14 +4,10 @@ use crate::spec::{Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOp
|
||||||
|
|
||||||
pub(crate) fn opts() -> TargetOptions {
|
pub(crate) fn opts() -> TargetOptions {
|
||||||
let mut pre_link_args = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &[
|
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",
|
"--disable-dynamicbase",
|
||||||
"--enable-auto-image-base",
|
"--enable-auto-image-base",
|
||||||
]);
|
]);
|
||||||
crate::spec::add_link_args(&mut pre_link_args, LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[
|
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,--disable-dynamicbase",
|
||||||
"-Wl,--enable-auto-image-base",
|
"-Wl,--enable-auto-image-base",
|
||||||
]);
|
]);
|
||||||
|
@ -42,9 +38,7 @@ pub(crate) fn opts() -> TargetOptions {
|
||||||
emit_debug_gdb_scripts: false,
|
emit_debug_gdb_scripts: false,
|
||||||
requires_uwtable: true,
|
requires_uwtable: true,
|
||||||
eh_frame_header: false,
|
eh_frame_header: false,
|
||||||
// FIXME(davidtwco): Support Split DWARF on Cygwin - may require LLVM changes to
|
debuginfo_kind: DebuginfoKind::Dwarf,
|
||||||
// output DWO, despite using DWARF, doesn't use ELF..
|
|
||||||
debuginfo_kind: DebuginfoKind::Pdb,
|
|
||||||
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
|
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,16 +3,8 @@ use crate::spec::{Cc, LinkerFlavor, Lld, Target, base};
|
||||||
pub(crate) fn target() -> Target {
|
pub(crate) fn target() -> Target {
|
||||||
let mut base = base::cygwin::opts();
|
let mut base = base::cygwin::opts();
|
||||||
base.cpu = "x86-64".into();
|
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"]);
|
||||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::No, Lld::No), &[
|
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
|
||||||
"-m",
|
|
||||||
"i386pep",
|
|
||||||
"--disable-high-entropy-va",
|
|
||||||
]);
|
|
||||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &[
|
|
||||||
"-m64",
|
|
||||||
"-Wl,--disable-high-entropy-va",
|
|
||||||
]);
|
|
||||||
base.max_atomic_width = Some(64);
|
base.max_atomic_width = Some(64);
|
||||||
base.linker = Some("x86_64-pc-cygwin-gcc".into());
|
base.linker = Some("x86_64-pc-cygwin-gcc".into());
|
||||||
Target {
|
Target {
|
||||||
|
@ -26,7 +18,7 @@ pub(crate) fn target() -> Target {
|
||||||
description: Some("64-bit x86 Cygwin".into()),
|
description: Some("64-bit x86 Cygwin".into()),
|
||||||
tier: Some(3),
|
tier: Some(3),
|
||||||
host_tools: Some(false),
|
host_tools: Some(false),
|
||||||
std: Some(true),
|
std: None,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue