ArchiveWrapper: handle LLVM API update
In llvm/llvm-project@f740bcb370 a boolean parameter changed to an enum. r? @nikic @rustbot label: +llvm-main
This commit is contained in:
parent
d8c69dfb37
commit
3977ed1e69
1 changed files with 5 additions and 0 deletions
|
@ -203,7 +203,12 @@ LLVMRustWriteArchive(char *Dst, size_t NumMembers,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LLVM_VERSION_LT(18, 0)
|
||||||
auto Result = writeArchive(Dst, Members, WriteSymbtab, Kind, true, false);
|
auto Result = writeArchive(Dst, Members, WriteSymbtab, Kind, true, false);
|
||||||
|
#else
|
||||||
|
auto SymtabMode = WriteSymbtab ? SymtabWritingMode::NormalSymtab : SymtabWritingMode::NoSymtab;
|
||||||
|
auto Result = writeArchive(Dst, Members, SymtabMode, Kind, true, false);
|
||||||
|
#endif
|
||||||
if (!Result)
|
if (!Result)
|
||||||
return LLVMRustResult::Success;
|
return LLVMRustResult::Success;
|
||||||
LLVMRustSetLastError(toString(std::move(Result)).c_str());
|
LLVMRustSetLastError(toString(std::move(Result)).c_str());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue