[llvm] r270820 - Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets"
Steven Wu via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 21:35:35 PDT 2016
Author: steven_wu
Date: Wed May 25 23:35:35 2016
New Revision: 270820
URL: http://llvm.org/viewvc/llvm-project?rev=270820&view=rev
Log:
Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets"
This reverts r270723. This commit breaks greendragon.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/tools/llvm-shlib/CMakeLists.txt
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=270820&r1=270819&r2=270820&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Wed May 25 23:35:35 2016
@@ -489,20 +489,25 @@ function(llvm_add_library name)
if(CMAKE_VERSION VERSION_LESS 2.8.12)
# Link libs w/o keywords, assuming PUBLIC.
- set(library_type)
+ target_link_libraries(${name}
+ ${ARG_LINK_LIBS}
+ ${lib_deps}
+ ${llvm_libs}
+ )
elseif(ARG_STATIC)
- set(library_type INTERFACE)
- elseif(APPLE)
- set(library_type PUBLIC)
+ target_link_libraries(${name} INTERFACE
+ ${ARG_LINK_LIBS}
+ ${lib_deps}
+ ${llvm_libs}
+ )
else()
# We can use PRIVATE since SO knows its dependent libs.
- set(library_type PRIVATE)
- endif()
- target_link_libraries(${name} ${library_type}
+ target_link_libraries(${name} PRIVATE
${ARG_LINK_LIBS}
${lib_deps}
${llvm_libs}
)
+ endif()
if(LLVM_COMMON_DEPENDS)
add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
Modified: llvm/trunk/tools/llvm-shlib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/CMakeLists.txt?rev=270820&r1=270819&r2=270820&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-shlib/CMakeLists.txt (original)
+++ llvm/trunk/tools/llvm-shlib/CMakeLists.txt Wed May 25 23:35:35 2016
@@ -38,17 +38,6 @@ endif()
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
-if(APPLE)
- set(library_type PUBLIC)
-else()
- # We can use PRIVATE since SO knows its dependent libs.
- set(library_type PRIVATE)
-endif()
-
-get_property(system_libs TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS)
-
-target_link_libraries(LLVM ${library_type} ${system_libs})
-
list(REMOVE_DUPLICATES LIB_NAMES)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
# GNU ld doesn't resolve symbols in the version script.
More information about the llvm-commits
mailing list