diff --git a/lld/MachO/CMakeLists.txt b/lld/MachO/CMakeLists.txt --- a/lld/MachO/CMakeLists.txt +++ b/lld/MachO/CMakeLists.txt @@ -55,3 +55,7 @@ MachOOptionsTableGen ${tablegen_deps} ) + +if(LLVM_HAVE_LIBXAR) + target_link_libraries(lldMachO2 PRIVATE ${XAR_LIB}) +endif() diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt --- a/lld/tools/lld/CMakeLists.txt +++ b/lld/tools/lld/CMakeLists.txt @@ -20,10 +20,6 @@ lldWasm ) -if(LLVM_HAVE_LIBXAR) - target_link_libraries(lld PRIVATE ${XAR_LIB}) -endif() - install(TARGETS lld RUNTIME DESTINATION bin)