diff options
| author | bors <bors@rust-lang.org> | 2025-08-07 07:47:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-08-07 07:47:18 +0000 |
| commit | 9b1a30e5e69e1537ef6eb6eb829eb47075206dea (patch) | |
| tree | 58efd6d8f35080bb0eb736ba03bcde25608ad0a8 /compiler/rustc_codegen_llvm/src/base.rs | |
| parent | 61cb1e97fcf954c37d0a457a8084ed9ad8b3cb82 (diff) | |
| parent | e02cc40ec96457ab563273a69d314418cea7eb84 (diff) | |
| download | rust-9b1a30e5e69e1537ef6eb6eb829eb47075206dea.tar.gz rust-9b1a30e5e69e1537ef6eb6eb829eb47075206dea.zip | |
Auto merge of #145014 - bjorn3:revert_preserve_debug_gdb_scripts, r=lqd
Revert "Preserve the .debug_gdb_scripts section" https://github.com/rust-lang/rust/pull/143679 introduces a significant build time perf regression for ripgrep. Let's revert it such that we can investigate it without pressure.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/base.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/base.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs index d7da03bf490..5dda836988c 100644 --- a/compiler/rustc_codegen_llvm/src/base.rs +++ b/compiler/rustc_codegen_llvm/src/base.rs @@ -109,16 +109,11 @@ pub(crate) fn compile_codegen_unit( } // Finalize code coverage by injecting the coverage map. Note, the coverage map will - // also be added to the `llvm.compiler.used` variable, created below. + // also be added to the `llvm.compiler.used` variable, created next. if cx.sess().instrument_coverage() { cx.coverageinfo_finalize(); } - // Finalize debuginfo. This adds to `llvm.used`, created below. - if cx.sess().opts.debuginfo != DebugInfo::None { - cx.debuginfo_finalize(); - } - // Create the llvm.used and llvm.compiler.used variables. if !cx.used_statics.is_empty() { cx.create_used_variable_impl(c"llvm.used", &cx.used_statics); @@ -135,6 +130,11 @@ pub(crate) fn compile_codegen_unit( llvm::LLVMDeleteGlobal(old_g); } } + + // Finalize debuginfo + if cx.sess().opts.debuginfo != DebugInfo::None { + cx.debuginfo_finalize(); + } } ModuleCodegen::new_regular(cgu_name.to_string(), llvm_module) |
