diff options
| author | bors <bors@rust-lang.org> | 2022-07-16 00:18:54 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-16 00:18:54 +0000 |
| commit | e6c43cf8b98e4837bbee1cab225621001a3f2230 (patch) | |
| tree | 38a6772a44832c2fd1fecdf58899605be298a34b /compiler/rustc_codegen_llvm/src/llvm | |
| parent | 8c1cc82a82ebfbea731258063115992b2dd4adee (diff) | |
| parent | 2085d6ac42c28e78ffedb559a7658b838d90b723 (diff) | |
| download | rust-e6c43cf8b98e4837bbee1cab225621001a3f2230.tar.gz rust-e6c43cf8b98e4837bbee1cab225621001a3f2230.zip | |
Auto merge of #95685 - oxidecomputer:restore-static-dwarf, r=pnkfelix
Revert "Work around invalid DWARF bugs for fat LTO" Since September, the toolchain has not been generating reliable DWARF information for static variables when LTO is on. This has affected projects in the embedded space where the use of LTO is typical. In our case, it has kept us from bumping past the 2021-09-22 nightly toolchain lest our debugger break. This has been a pretty dramatic regression for people using debuggers and static variables. See #90357 for more info and a repro case. This commit is a mechanical revert of d5de680e20def848751cb3c11e1182408112b1d3 from PR #89041, which caused the issue. (Note on that PR that the commit's author has requested it be reverted.) I have locally verified that this fixes #90357 by restoring the functionality of both the repro case I posted on that bug, and debugger behavior on real programs. There do not appear to be test cases for this in the toolchain; if I've missed them, point me at 'em and I'll update them.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 5ebc2d6139f..0ad65e5d99b 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -2508,8 +2508,12 @@ extern "C" { len: usize, out_len: &mut usize, ) -> *const u8; - pub fn LLVMRustLTOGetDICompileUnit(M: &Module, CU1: &mut *mut c_void, CU2: &mut *mut c_void); - pub fn LLVMRustLTOPatchDICompileUnit(M: &Module, CU: *mut c_void); + pub fn LLVMRustThinLTOGetDICompileUnit( + M: &Module, + CU1: &mut *mut c_void, + CU2: &mut *mut c_void, + ); + pub fn LLVMRustThinLTOPatchDICompileUnit(M: &Module, CU: *mut c_void); pub fn LLVMRustLinkerNew(M: &Module) -> &mut Linker<'_>; pub fn LLVMRustLinkerAdd( |
