[lld-macho] Fix BUILD_SHARED_LIBS build

ca6751043d added a dependency on XAR (at
least for the shared libs build), so without this change we get the
following linker error:

Undefined symbols for architecture x86_64:
  "_xar_close", referenced from:
      lld::macho::BitcodeBundleSection::finalize() in SyntheticSections.cpp.o

Reviewed By: #lld-macho, int3, thakis

Differential Revision: https://reviews.llvm.org/D100999
This commit is contained in:
Alex Richardson 2021-06-03 19:58:43 +01:00
parent d1d36f7ad2
commit 90344499ae
2 changed files with 4 additions and 4 deletions

View File

@ -55,3 +55,7 @@ add_lld_library(lldMachO2
MachOOptionsTableGen
${tablegen_deps}
)
if(LLVM_HAVE_LIBXAR)
target_link_libraries(lldMachO2 PRIVATE ${XAR_LIB})
endif()

View File

@ -20,10 +20,6 @@ target_link_libraries(lld
lldWasm
)
if(LLVM_HAVE_LIBXAR)
target_link_libraries(lld PRIVATE ${XAR_LIB})
endif()
install(TARGETS lld
RUNTIME DESTINATION bin)