diff options
| author | Augie Fackler <augie@google.com> | 2023-09-07 09:48:50 -0400 |
|---|---|---|
| committer | Augie Fackler <augie@google.com> | 2023-09-08 10:45:22 -0400 |
| commit | 942bdf910cc85e6389546e25cfb391062095cbd8 (patch) | |
| tree | 91124d6cca775a5abb8e70b2d7fdd132dfd49b14 /compiler/rustc_codegen_llvm/src/llvm | |
| parent | cd71a37f320c379df47ff64abd934f3a2da94c26 (diff) | |
| download | rust-942bdf910cc85e6389546e25cfb391062095cbd8.tar.gz rust-942bdf910cc85e6389546e25cfb391062095cbd8.zip | |
lto: load bitcode sections by name
Upstream change llvm/llvm-project@6b539f5eb8ef1d3a3c87873caa2dbd5147e1adbd changed `isSectionBitcode` works and it now only respects `.llvm.lto` sections instead of also `.llvmbc`, which it says was never intended to be used for LTO. We instead load sections by name, and sniff for raw bitcode by hand. r? @nikic @rustbot label: +llvm-main
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index 1f03c932cfd..8e96410deaf 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -2322,6 +2322,12 @@ extern "C" { len: usize, out_len: &mut usize, ) -> *const u8; + pub fn LLVMRustGetSliceFromObjectDataByName( + data: *const u8, + len: usize, + name: *const u8, + out_len: &mut usize, + ) -> *const u8; pub fn LLVMRustLinkerNew(M: &Module) -> &mut Linker<'_>; pub fn LLVMRustLinkerAdd( |
