Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/base/windows_gnu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ pub(crate) fn opts() -> TargetOptions {
emit_debug_gdb_scripts: false,
requires_uwtable: true,
eh_frame_header: false,
debuginfo_kind: DebuginfoKind::Dwarf,
// 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()
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/base/windows_gnullvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ pub(crate) fn opts() -> TargetOptions {
has_thread_local: true,
crt_static_allows_dylibs: true,
crt_static_respected: true,
debuginfo_kind: DebuginfoKind::Dwarf,
// 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()
}
Expand Down
29 changes: 29 additions & 0 deletions tests/ui/debuginfo/windows_gnu_split_debuginfo_off.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=off
//@ check-pass

//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
//@[aarch64_gl] needs-llvm-components: aarch64

//@[i686_g] compile-flags: --target i686-pc-windows-gnu
//@[i686_g] needs-llvm-components: x86

//@[i686_gl] compile-flags: --target i686-pc-windows-gnullvm
//@[i686_gl] needs-llvm-components: x86

//@[i686_uwp_g] compile-flags: --target i686-uwp-windows-gnu
//@[i686_uwp_g] needs-llvm-components: x86

//@[x86_64_g] compile-flags: --target x86_64-pc-windows-gnu
//@[x86_64_g] needs-llvm-components: x86

//@[x86_64_gl] compile-flags: --target x86_64-pc-windows-gnullvm
//@[x86_64_gl] needs-llvm-components: x86

//@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu
//@[x86_64_uwp_g] needs-llvm-components: x86

#![feature(no_core)]

#![no_core]
#![no_std]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

29 changes: 29 additions & 0 deletions tests/ui/debuginfo/windows_gnu_split_debuginfo_packed.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=packed
//@ error-pattern: error: `-Csplit-debuginfo=packed` is unstable on this platform

//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
//@[aarch64_gl] needs-llvm-components: aarch64

//@[i686_g] compile-flags: --target i686-pc-windows-gnu
//@[i686_g] needs-llvm-components: x86

//@[i686_gl] compile-flags: --target i686-pc-windows-gnullvm
//@[i686_gl] needs-llvm-components: x86

//@[i686_uwp_g] compile-flags: --target i686-uwp-windows-gnu
//@[i686_uwp_g] needs-llvm-components: x86

//@[x86_64_g] compile-flags: --target x86_64-pc-windows-gnu
//@[x86_64_g] needs-llvm-components: x86

//@[x86_64_gl] compile-flags: --target x86_64-pc-windows-gnullvm
//@[x86_64_gl] needs-llvm-components: x86

//@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu
//@[x86_64_uwp_g] needs-llvm-components: x86

#![feature(no_core)]

#![no_core]
#![no_std]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=packed` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

29 changes: 29 additions & 0 deletions tests/ui/debuginfo/windows_gnu_split_debuginfo_unpacked.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=unpacked
//@ error-pattern: error: `-Csplit-debuginfo=unpacked` is unstable on this platform

//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
//@[aarch64_gl] needs-llvm-components: aarch64

//@[i686_g] compile-flags: --target i686-pc-windows-gnu
//@[i686_g] needs-llvm-components: x86

//@[i686_gl] compile-flags: --target i686-pc-windows-gnullvm
//@[i686_gl] needs-llvm-components: x86

//@[i686_uwp_g] compile-flags: --target i686-uwp-windows-gnu
//@[i686_uwp_g] needs-llvm-components: x86

//@[x86_64_g] compile-flags: --target x86_64-pc-windows-gnu
//@[x86_64_g] needs-llvm-components: x86

//@[x86_64_gl] compile-flags: --target x86_64-pc-windows-gnullvm
//@[x86_64_gl] needs-llvm-components: x86

//@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu
//@[x86_64_uwp_g] needs-llvm-components: x86

#![feature(no_core)]

#![no_core]
#![no_std]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
error: `-Csplit-debuginfo=unpacked` is unstable on this platform

error: aborting due to 1 previous error

Loading