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

Generate pdb file when strip=debuginfo #123031

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ impl<'a> Linker for MsvcLinker<'a> {

fn debuginfo(&mut self, strip: Strip, natvis_debugger_visualizers: &[PathBuf]) {
match strip {
Strip::None => {
Strip::None | Strip::Debuginfo => {
// This will cause the Microsoft linker to generate a PDB file
// from the CodeView line tables in the object files.
self.cmd.arg("/DEBUG");
Expand Down Expand Up @@ -965,7 +965,7 @@ impl<'a> Linker for MsvcLinker<'a> {
self.cmd.arg(arg);
}
}
Strip::Debuginfo | Strip::Symbols => {
Strip::Symbols => {
self.cmd.arg("/DEBUG:NONE");
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/doc/rustc/src/codegen-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,7 @@ Supported values for this option are:
binary or separate files depending on the target (e.g. `.pdb` files in case
of MSVC).
- `debuginfo` - debuginfo sections and debuginfo symbols from the symbol table
section are stripped at link time and are not copied to the produced binary
or separate files.
section are stripped at link time and are not copied to the produced binary.
- `symbols` - same as `debuginfo`, but the rest of the symbol table section is
stripped as well if the linker supports it.

Expand Down
Loading