Skip to content

Commit 27155e5

Browse files
authored
Rollup merge of #135790 - wesleywiser:update_windows_gnu_debuginfokind, r=lqd
Update windows-gnu targets to set `DebuginfoKind::DWARF` These targets have always used DWARF debuginfo and not CodeView/PDB debuginfo like the MSVC Windows targets. However, their target definitions claim to use `DebuginfoKind::PDB` probably to ensure that we do not try to allow the use of split-DWARF debuginfo. This does not appear to be necessary since the targets set their supported split debug info to `Off`. I've looked at all of the uses of these properties and this patch does not appear to cause any functional changes in compiler behavior. I also added UI tests to attempt to validate there is no change in the behavior of these options on stable compilers. cc ````@mati865```` since you mentioned this in #135739 cc ````@davidtwco```` for split-dwarf
2 parents a6157d3 + 0b24fc9 commit 27155e5

19 files changed

+145
-2
lines changed

compiler/rustc_target/src/spec/base/windows_gnu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ pub(crate) fn opts() -> TargetOptions {
9797
emit_debug_gdb_scripts: false,
9898
requires_uwtable: true,
9999
eh_frame_header: false,
100+
debuginfo_kind: DebuginfoKind::Dwarf,
100101
// FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to
101102
// output DWO, despite using DWARF, doesn't use ELF..
102-
debuginfo_kind: DebuginfoKind::Pdb,
103103
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
104104
..Default::default()
105105
}

compiler/rustc_target/src/spec/base/windows_gnullvm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ pub(crate) fn opts() -> TargetOptions {
4444
has_thread_local: true,
4545
crt_static_allows_dylibs: true,
4646
crt_static_respected: true,
47+
debuginfo_kind: DebuginfoKind::Dwarf,
4748
// FIXME(davidtwco): Support Split DWARF on Windows GNU - may require LLVM changes to
4849
// output DWO, despite using DWARF, doesn't use ELF..
49-
debuginfo_kind: DebuginfoKind::Pdb,
5050
supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
5151
..Default::default()
5252
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
2+
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=off
3+
//@ check-pass
4+
5+
//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
6+
//@[aarch64_gl] needs-llvm-components: aarch64
7+
8+
//@[i686_g] compile-flags: --target i686-pc-windows-gnu
9+
//@[i686_g] needs-llvm-components: x86
10+
11+
//@[i686_gl] compile-flags: --target i686-pc-windows-gnullvm
12+
//@[i686_gl] needs-llvm-components: x86
13+
14+
//@[i686_uwp_g] compile-flags: --target i686-uwp-windows-gnu
15+
//@[i686_uwp_g] needs-llvm-components: x86
16+
17+
//@[x86_64_g] compile-flags: --target x86_64-pc-windows-gnu
18+
//@[x86_64_g] needs-llvm-components: x86
19+
20+
//@[x86_64_gl] compile-flags: --target x86_64-pc-windows-gnullvm
21+
//@[x86_64_gl] needs-llvm-components: x86
22+
23+
//@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu
24+
//@[x86_64_uwp_g] needs-llvm-components: x86
25+
26+
#![feature(no_core)]
27+
28+
#![no_core]
29+
#![no_std]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=packed` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=packed` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=packed` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=packed` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
2+
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=packed
3+
//@ error-pattern: error: `-Csplit-debuginfo=packed` is unstable on this platform
4+
5+
//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
6+
//@[aarch64_gl] needs-llvm-components: aarch64
7+
8+
//@[i686_g] compile-flags: --target i686-pc-windows-gnu
9+
//@[i686_g] needs-llvm-components: x86
10+
11+
//@[i686_gl] compile-flags: --target i686-pc-windows-gnullvm
12+
//@[i686_gl] needs-llvm-components: x86
13+
14+
//@[i686_uwp_g] compile-flags: --target i686-uwp-windows-gnu
15+
//@[i686_uwp_g] needs-llvm-components: x86
16+
17+
//@[x86_64_g] compile-flags: --target x86_64-pc-windows-gnu
18+
//@[x86_64_g] needs-llvm-components: x86
19+
20+
//@[x86_64_gl] compile-flags: --target x86_64-pc-windows-gnullvm
21+
//@[x86_64_gl] needs-llvm-components: x86
22+
23+
//@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu
24+
//@[x86_64_uwp_g] needs-llvm-components: x86
25+
26+
#![feature(no_core)]
27+
28+
#![no_core]
29+
#![no_std]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=packed` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=packed` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=packed` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=unpacked` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=unpacked` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=unpacked` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=unpacked` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//@ revisions: aarch64_gl i686_g i686_gl i686_uwp_g x86_64_g x86_64_gl x86_64_uwp_g
2+
//@ compile-flags: --crate-type cdylib -Csplit-debuginfo=unpacked
3+
//@ error-pattern: error: `-Csplit-debuginfo=unpacked` is unstable on this platform
4+
5+
//@[aarch64_gl] compile-flags: --target aarch64-pc-windows-gnullvm
6+
//@[aarch64_gl] needs-llvm-components: aarch64
7+
8+
//@[i686_g] compile-flags: --target i686-pc-windows-gnu
9+
//@[i686_g] needs-llvm-components: x86
10+
11+
//@[i686_gl] compile-flags: --target i686-pc-windows-gnullvm
12+
//@[i686_gl] needs-llvm-components: x86
13+
14+
//@[i686_uwp_g] compile-flags: --target i686-uwp-windows-gnu
15+
//@[i686_uwp_g] needs-llvm-components: x86
16+
17+
//@[x86_64_g] compile-flags: --target x86_64-pc-windows-gnu
18+
//@[x86_64_g] needs-llvm-components: x86
19+
20+
//@[x86_64_gl] compile-flags: --target x86_64-pc-windows-gnullvm
21+
//@[x86_64_gl] needs-llvm-components: x86
22+
23+
//@[x86_64_uwp_g] compile-flags: --target x86_64-uwp-windows-gnu
24+
//@[x86_64_uwp_g] needs-llvm-components: x86
25+
26+
#![feature(no_core)]
27+
28+
#![no_core]
29+
#![no_std]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=unpacked` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=unpacked` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
error: `-Csplit-debuginfo=unpacked` is unstable on this platform
2+
3+
error: aborting due to 1 previous error
4+

0 commit comments

Comments
 (0)