From e8df5cfb65af7c7fb0de5f20b738546082c44b13 Mon Sep 17 00:00:00 2001 From: Steven Johnson Date: Wed, 23 Aug 2023 11:05:37 -0700 Subject: [PATCH] Fix for top-of-tree LLVM (#7798) --- src/LLVM_Output.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/LLVM_Output.cpp b/src/LLVM_Output.cpp index 3106fec840a8..f0aadfb9a869 100644 --- a/src/LLVM_Output.cpp +++ b/src/LLVM_Output.cpp @@ -593,7 +593,11 @@ void create_static_library(const std::vector &src_files_in, const T return; } +#if LLVM_VERSION >= 180 + const llvm::SymtabWritingMode write_symtab = llvm::SymtabWritingMode::NormalSymtab; +#else const bool write_symtab = true; +#endif const auto kind = Internal::get_triple_for_target(target).isOSDarwin() ? llvm::object::Archive::K_BSD : llvm::object::Archive::K_GNU; const bool thin = false; auto result = llvm::writeArchive(dst_file, new_members,