diff options
| author | 王宇逸 <Strawberry_Str@hotmail.com> | 2025-02-05 09:26:17 +0800 |
|---|---|---|
| committer | 王宇逸 <Strawberry_Str@hotmail.com> | 2025-02-10 17:13:27 +0800 |
| commit | 33d0f386f697ecf870df6fade85cf7183931b9da (patch) | |
| tree | d6fd961374ba0de1603936185a1f87fb1e99b83f | |
| parent | f94ada13deab495c48984a46cac56151a1e98f6d (diff) | |
| download | rust-33d0f386f697ecf870df6fade85cf7183931b9da.tar.gz rust-33d0f386f697ecf870df6fade85cf7183931b9da.zip | |
Apply suggestions
| -rw-r--r-- | compiler/rustc_target/src/spec/base/cygwin.rs | 8 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/x86_64_pc_cygwin.rs | 14 |
2 files changed, 4 insertions, 18 deletions
diff --git a/compiler/rustc_target/src/spec/base/cygwin.rs b/compiler/rustc_target/src/spec/base/cygwin.rs index 2d29060c47a..8cb3cceb2d5 100644 --- a/compiler/rustc_target/src/spec/base/cygwin.rs +++ b/compiler/rustc_target/src/spec/base/cygwin.rs @@ -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() } diff --git a/compiler/rustc_target/src/spec/targets/x86_64_pc_cygwin.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_cygwin.rs index a5bedd07e6b..8da4fe6b8b1 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_pc_cygwin.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_cygwin.rs @@ -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, }, } } |
