lto: handle Apple platforms correctly by eliding __LLVM, from section name
This commit is contained in:
parent
942bdf910c
commit
9ad0396a34
1 changed files with 4 additions and 1 deletions
|
@ -154,7 +154,10 @@ fn get_bitcode_slice_from_object_data<'a>(
|
|||
if obj.starts_with(b"\xDE\xC0\x17\x0B") || obj.starts_with(b"BC\xC0\xDE") {
|
||||
return Ok(obj);
|
||||
}
|
||||
let section_name = bitcode_section_name(cgcx);
|
||||
// We drop the "__LLVM," prefix here because on Apple platforms there's a notion of "segment name"
|
||||
// which in the public API for sections gets treated as part of the section name, but internally
|
||||
// in MachOObjectFile.cpp gets treated separately.
|
||||
let section_name = bitcode_section_name(cgcx).trim_start_matches("__LLVM,");
|
||||
let mut len = 0;
|
||||
let data = unsafe {
|
||||
llvm::LLVMRustGetSliceFromObjectDataByName(
|
||||
|
|
Loading…
Add table
Reference in a new issue