Skip to content

Commit

Permalink
Rollup merge of rust-lang#104067 - jeremyd2019:patch-1, r=davidtwco
Browse files Browse the repository at this point in the history
fix debuginfo for windows_gnullvm_base.rs

These lines (including the FIXME comment) were added to windows_gnu_base.rs in cf2c492 but windows_gnullvm_base.rs was not updated.  This resulted in an error `LLVM ERROR: dwo only supported with ELF and Wasm` attempting to build on aarch64-pc-windows-gnullvm.

See also msys2/MINGW-packages#13921 (comment)

/cc ```@mati865``` ```@davidtwco```

r? ```@davidtwco```
  • Loading branch information
Dylan-DPC authored Nov 8, 2022
2 parents 58c13e0 + 6994651 commit 2b9e099
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/rustc_target/src/spec/windows_gnullvm_base.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, TargetOptions};
use crate::spec::{cvs, Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions};
use std::borrow::Cow;

pub fn opts() -> TargetOptions {
// We cannot use `-nodefaultlibs` because compiler-rt has to be passed
Expand Down Expand Up @@ -36,7 +37,10 @@ pub fn opts() -> TargetOptions {
eh_frame_header: false,
no_default_libraries: false,
has_thread_local: true,

// FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to
// output DWO, despite using DWARF, doesn't use ELF..
debuginfo_kind: DebuginfoKind::Pdb,
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
..Default::default()
}
}

0 comments on commit 2b9e099

Please sign in to comment.