diff options
author | Steven Wu <stevenwu@apple.com> | 2016-05-26 04:35:35 +0000 |
---|---|---|
committer | Steven Wu <stevenwu@apple.com> | 2016-05-26 04:35:35 +0000 |
commit | ec6f56eb3965cd3362c0161206bac50211ae7810 (patch) | |
tree | 4bf7cfa994284e04ba2365508b2cf90610ebcd93 /llvm/cmake | |
parent | a423aa4642f4272a108ce0a6c8f833afc18a6438 (diff) | |
download | bcm5719-llvm-ec6f56eb3965cd3362c0161206bac50211ae7810.tar.gz bcm5719-llvm-ec6f56eb3965cd3362c0161206bac50211ae7810.zip |
Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets"
This reverts r270723. This commit breaks greendragon.
llvm-svn: 270820
Diffstat (limited to 'llvm/cmake')
-rw-r--r-- | llvm/cmake/modules/AddLLVM.cmake | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake index 573d8725106..06d26673e96 100644 --- a/llvm/cmake/modules/AddLLVM.cmake +++ b/llvm/cmake/modules/AddLLVM.cmake @@ -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}) |