Skip to content

Commit 8c24ce1

Browse files
Rollup merge of #115106 - durin42:llvm-18-symtabwritingmode, r=nikic
ArchiveWrapper: handle LLVM API update In llvm/llvm-project@f740bcb a boolean parameter changed to an enum. r? ``@nikic`` ``@rustbot`` label: +llvm-main
2 parents b3949c0 + 3977ed1 commit 8c24ce1

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)