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:
parent
cd71a37f32
commit
942bdf910c
4 changed files with 86 additions and 16 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue