--- a/llvm/tools/llvm-objdump/CMakeLists.txt	2018-05-15 08:46:43.000000000 +0800
+++ b/llvm/tools/llvm-objdump/CMakeLists.txt	2024-05-17 01:52:39.000000000 +0800
@@ -23,9 +23,9 @@
   WasmDump.cpp
   )
 
-if(HAVE_LIBXAR)
-  target_link_libraries(llvm-objdump PRIVATE ${XAR_LIB})
-endif()
+#if(HAVE_LIBXAR)
+#  target_link_libraries(llvm-objdump PRIVATE ${XAR_LIB})
+#endif()
 
 if(LLVM_INSTALL_BINUTILS_SYMLINKS)
   add_llvm_tool_symlink(objdump llvm-objdump)

--- a/llvm/tools/llvm-objdump/MachODump.cpp	2018-07-06 13:11:35.000000000 +0800
+++ b/llvm/tools/llvm-objdump/MachODump.cpp	2024-05-17 01:52:19.000000000 +0800
@@ -49,7 +49,7 @@
 #include <cstring>
 #include <system_error>
 
-#ifdef HAVE_LIBXAR
+#if 0
 extern "C" {
 #include <xar/xar.h>
 }
@@ -197,7 +197,7 @@
 typedef std::vector<DiceTableEntry> DiceTable;
 typedef DiceTable::iterator dice_table_iterator;
 
-#ifdef HAVE_LIBXAR
+#if 0
 namespace {
 struct ScopedXarFile {
   xar_t xar;
@@ -1393,7 +1393,7 @@
                              StringRef DisSegName, StringRef DisSectName);
 static void DumpProtocolSection(MachOObjectFile *O, const char *sect,
                                 uint32_t size, uint32_t addr);
-#ifdef HAVE_LIBXAR
+#if 0
 static void DumpBitcodeSection(MachOObjectFile *O, const char *sect,
                                 uint32_t size, bool verbose,
                                 bool PrintXarHeader, bool PrintXarFileHeaders,
@@ -1460,7 +1460,7 @@
             DumpProtocolSection(O, sect, sect_size, sect_addr);
             continue;
           }
-#ifdef HAVE_LIBXAR
+#if 0
           if (SegName == "__LLVM" && SectName == "__bundle") {
             DumpBitcodeSection(O, sect, sect_size, verbose, !NoSymbolicOperands,
                                ArchiveHeaders, "");
@@ -6080,7 +6080,7 @@
   }
 }
 
-#ifdef HAVE_LIBXAR
+#if 0
 inline void swapStruct(struct xar_header &xar) {
   sys::swapByteOrder(xar.magic);
   sys::swapByteOrder(xar.size);

--- a/llvm/cmake/config-ix.cmake	2018-06-15 02:19:54.000000000 +0800
+++ b/llvm/cmake/config-ix.cmake	2024-05-17 01:52:59.000000000 +0800
@@ -163,10 +163,10 @@
   message(FATAL_ERROR "Failed to congifure libxml2")
 endif()
 
-check_library_exists(xar xar_open "" HAVE_LIBXAR)
-if(HAVE_LIBXAR)
-  set(XAR_LIB xar)
-endif()
+#check_library_exists(xar xar_open "" HAVE_LIBXAR)
+#if(HAVE_LIBXAR)
+#  set(XAR_LIB xar)
+#endif()
 
 # function checks
 check_symbol_exists(arc4random "stdlib.h" HAVE_DECL_ARC4RANDOM)
