1
Fork 0

lto: load bitcode sections by name

Upstream change
llvm/llvm-project@6b539f5eb8 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
This commit is contained in:
Augie Fackler 2023-09-07 09:48:50 -04:00
parent cd71a37f32
commit 942bdf910c
4 changed files with 86 additions and 16 deletions

View file

@ -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(