Rollup merge of #115106 - durin42:llvm-18-symtabwritingmode, r=nikic

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:
Guillaume Gomez 2023-08-23 17:46:35 +02:00 committed by GitHub
commit 8c24ce115e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
#else
auto SymtabMode = WriteSymbtab ? SymtabWritingMode::NormalSymtab : SymtabWritingMode::NoSymtab;
auto Result = writeArchive(Dst, Members, SymtabMode, Kind, true, false);
#endif
if (!Result)
return LLVMRustResult::Success;
LLVMRustSetLastError(toString(std::move(Result)).c_str());