Skip to content

Commit 3977ed1

Browse files
committed
ArchiveWrapper: handle LLVM API update
In llvm/llvm-project@f740bcb a boolean parameter changed to an enum. r? @nikic @rustbot label: +llvm-main
1 parent d8c69df commit 3977ed1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ LLVMRustWriteArchive(char *Dst, size_t NumMembers,
203203
}
204204
}
205205

206+
#if LLVM_VERSION_LT(18, 0)
206207
auto Result = writeArchive(Dst, Members, WriteSymbtab, Kind, true, false);
208+
#else
209+
auto SymtabMode = WriteSymbtab ? SymtabWritingMode::NormalSymtab : SymtabWritingMode::NoSymtab;
210+
auto Result = writeArchive(Dst, Members, SymtabMode, Kind, true, false);
211+
#endif
207212
if (!Result)
208213
return LLVMRustResult::Success;
209214
LLVMRustSetLastError(toString(std::move(Result)).c_str());

0 commit comments

Comments
 (0)