diff options
| author | bors <bors@rust-lang.org> | 2025-08-06 13:02:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-06 13:02:36 +0000 |
| commit | 8fb40f798a23adf608182ce5f4eb151fdc8e0da5 (patch) | |
| tree | 9ffc89ae51d0d74fc63f7163b6567dd65f5d0054 /compiler/rustc_codegen_gcc | |
| parent | dc0bae1db725fbba8524f195f74f680995fd549e (diff) | |
| parent | b4d923cea0509933b1fb859930cb20784251f9be (diff) | |
| download | rust-8fb40f798a23adf608182ce5f4eb151fdc8e0da5.tar.gz rust-8fb40f798a23adf608182ce5f4eb151fdc8e0da5.zip | |
Auto merge of #143679 - sebastianpoeplau:preserve-debug-gdb-scripts-section, r=bjorn3
Preserve the .debug_gdb_scripts section Make sure that compiler and linker don't optimize the section's contents away by adding the global holding the data to `llvm.used`. This eliminates the need for a volatile load in the main shim; since the LLVM codegen backend is the only implementer of the corresponding trait function, remove it entirely. Pretty printers in dylib dependencies are now emitted by the main crate instead of the dylib; apart from matching how rlibs are handled, this approach has the advantage that `omit_gdb_pretty_printer_section` keeps working with dylib dependencies. r? `@bjorn3`
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/debuginfo.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_gcc/src/debuginfo.rs b/compiler/rustc_codegen_gcc/src/debuginfo.rs index 4c8585192a1..4c0b6439523 100644 --- a/compiler/rustc_codegen_gcc/src/debuginfo.rs +++ b/compiler/rustc_codegen_gcc/src/debuginfo.rs @@ -254,7 +254,8 @@ impl<'gcc, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { // TODO(antoyo): implement. } - fn debuginfo_finalize(&self) { + fn debuginfo_finalize(&mut self) { + // TODO: emit section `.debug_gdb_scripts`. self.context.set_debug_info(true) } |
