OSDN Git Service

[CMake] Restrict libxar linkage to just llvm-objdump
authorChris Bieneman <beanz@apple.com>
Thu, 26 May 2016 16:32:40 +0000 (16:32 +0000)
committerChris Bieneman <beanz@apple.com>
Thu, 26 May 2016 16:32:40 +0000 (16:32 +0000)
At some point we're going to need libObject to have this dependency, but as it is now this is causing too many headaches. This commit will reduce the linkage to just llvm-objdump where it is strictly needed, and we'll cross the libObject bridge later when we need it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270866 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Object/CMakeLists.txt
lib/Support/CMakeLists.txt
tools/llvm-objdump/CMakeLists.txt

index b293d1c..0a37cc3 100644 (file)
@@ -21,6 +21,4 @@ add_llvm_library(LLVMObject
 
   DEPENDS
   intrinsics_gen
-
-  LINK_LIBS ${XAR_LIB}
   )
index 3c8f78b..3d718e6 100644 (file)
@@ -24,9 +24,6 @@ elseif( CMAKE_HOST_UNIX )
   if( UNIX AND NOT (BEOS OR HAIKU) )
     set(system_libs ${system_libs} m)
   endif()
-  if(HAVE_LIBXAR)
-    list(APPEND system_libs ${XAR_LIB})
-  endif()
 endif( MSVC OR MINGW )
 
 add_llvm_library(LLVMSupport
index d0dd4ac..551847f 100644 (file)
@@ -17,3 +17,7 @@ add_llvm_tool(llvm-objdump
   ELFDump.cpp
   MachODump.cpp
   )
+
+if(HAVE_LIBXAR)
+  target_link_libraries(llvm-objdump ${XAR_LIB})
+endif()