Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-C split-debuginfo=packed generates duplicate .dwp files for shared objects #109309

Open
jyn514 opened this issue Mar 18, 2023 · 4 comments
Open
Assignees
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@jyn514
Copy link
Member

jyn514 commented Mar 18, 2023

I tried this code:

./configure --set rust.split-debuginfo=packed
x build --stage 0 compiler

I expected to see this happen: rustc/cargo generate a large .dwp file for rustc_driver.so and a small .dwp file for rustc-main.

Instead, this happened: Both crates have duplicate .dwp files:

; ls -lh build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/*rustc*
-rwxrwxr-x 4 jyn jyn 310M Mar 18 09:47 build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/librustc_driver.so
-rw-rw-r-- 2 jyn jyn 254M Mar 18 09:47 build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/librustc_driver.so.dwp
-rwxrwxr-x 3 jyn jyn  20K Mar 18 09:47 build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/rustc-main
-rw-rw-r-- 2 jyn jyn 254M Mar 18 09:47 build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/rustc-main.dwp

Meta

beta is

rust/src/stage0.json

Lines 19 to 22 in bb8a0ff

"compiler": {
"date": "2023-03-07",
"version": "beta"
},

@jyn514 jyn514 added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 18, 2023
@jyn514
Copy link
Member Author

jyn514 commented Mar 20, 2023

Found while investigating #64405 and #104968.

@jyn514
Copy link
Member Author

jyn514 commented Apr 29, 2023

Windows does not have this bug.

PS C:\Users\jyn\src\rust2> ls .\build\host\stage0-rustc\x86_64-pc-windows-msvc\release\


    Directory: C:\Users\jyn\src\rust2\build\host\stage0-rustc\x86_64-pc-windows-msvc\release


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         4/29/2023  11:25 AM         112640 rustc-main.exe
-a----         4/29/2023  11:25 AM      128864768 rustc_driver.dll
-a----         4/29/2023  11:25 AM      282644480 rustc_driver.pdb
-a----         4/29/2023  11:25 AM        3608576 rustc_main.pdb

@jyn514 jyn514 added the I-compiler-nominated The issue / PR has been nominated for discussion during a compiler team meeting. label Jun 7, 2023
@jyn514
Copy link
Member Author

jyn514 commented Jun 7, 2023

I nominated this because I'd like to ship a split-debuginfo rustc-debug component (or similar) for Linux, but this is blocking the work because the size of the component would be too large until it's fixed.

@pnkfelix
Copy link
Member

pnkfelix commented Jun 8, 2023

Assigning to @davidtwco for investigation.

@apiraino apiraino removed the I-compiler-nominated The issue / PR has been nominated for discussion during a compiler team meeting. label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants