mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Revert "[CMake] LINK_LIBS need to be public for Darwin dylib targets"
This reverts r270723. This commit breaks greendragon. llvm-svn: 270820
This commit is contained in:
parent
b6c098560d
commit
2a3de303da
@ -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)
|
||||
elseif(ARG_STATIC)
|
||||
set(library_type INTERFACE)
|
||||
elseif(APPLE)
|
||||
set(library_type PUBLIC)
|
||||
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}
|
||||
${ARG_LINK_LIBS}
|
||||
${lib_deps}
|
||||
${llvm_libs}
|
||||
)
|
||||
elseif(ARG_STATIC)
|
||||
target_link_libraries(${name} INTERFACE
|
||||
${ARG_LINK_LIBS}
|
||||
${lib_deps}
|
||||
${llvm_libs}
|
||||
)
|
||||
else()
|
||||
# We can use PRIVATE since SO knows its dependent libs.
|
||||
target_link_libraries(${name} PRIVATE
|
||||
${ARG_LINK_LIBS}
|
||||
${lib_deps}
|
||||
${llvm_libs}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(LLVM_COMMON_DEPENDS)
|
||||
add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user