Skip to content

Commit 5d1c760

Browse files
committed
build: remove LINK_LIBRARIES from _add_swift_host_library_single
1 parent abb9d7d commit 5d1c760

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@ endfunction()
679679
# [SDK sdk]
680680
# [ARCHITECTURE architecture]
681681
# [DEPENDS dep1 ...]
682-
# [LINK_LIBRARIES dep1 ...]
683682
# [FRAMEWORK_DEPENDS dep1 ...]
684683
# [FRAMEWORK_DEPENDS_WEAK dep1 ...]
685684
# [LLVM_LINK_COMPONENTS comp1 ...]
@@ -710,9 +709,6 @@ endfunction()
710709
# DEPENDS
711710
# Targets that this library depends on.
712711
#
713-
# LINK_LIBRARIES
714-
# Libraries this library depends on.
715-
#
716712
# FRAMEWORK_DEPENDS
717713
# System frameworks this library depends on.
718714
#
@@ -758,7 +754,6 @@ function(_add_swift_host_library_single target name)
758754
INCORPORATE_OBJECT_LIBRARIES
759755
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
760756
LINK_FLAGS
761-
LINK_LIBRARIES
762757
LLVM_LINK_COMPONENTS
763758
PRIVATE_LINK_LIBRARIES
764759
SWIFT_COMPILE_FLAGS)
@@ -849,8 +844,6 @@ function(_add_swift_host_library_single target name)
849844
-libc;${SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY})
850845
endif()
851846

852-
# FIXME: don't actually depend on the libraries in SWIFTLIB_SINGLE_LINK_LIBRARIES,
853-
# just any swiftmodule files that are associated with them.
854847
handle_swift_sources(
855848
swift_object_dependency_target
856849
swift_module_dependency_target
@@ -863,7 +856,6 @@ function(_add_swift_host_library_single target name)
863856
${gyb_dependency_targets}
864857
${SWIFTLIB_SINGLE_DEPENDS}
865858
${SWIFTLIB_SINGLE_FILE_DEPENDS}
866-
${SWIFTLIB_SINGLE_LINK_LIBRARIES}
867859
SDK ${SWIFTLIB_SINGLE_SDK}
868860
ARCHITECTURE ${SWIFTLIB_SINGLE_ARCHITECTURE}
869861
MODULE_NAME ${module_name}
@@ -1011,20 +1003,6 @@ function(_add_swift_host_library_single target name)
10111003
"${swift_module_dependency_target}"
10121004
${LLVM_COMMON_DEPENDS})
10131005

1014-
if("${libkind}" STREQUAL "SHARED")
1015-
target_link_libraries("${target}" PRIVATE ${SWIFTLIB_SINGLE_LINK_LIBRARIES})
1016-
else()
1017-
target_link_libraries("${target}" INTERFACE ${SWIFTLIB_SINGLE_LINK_LIBRARIES})
1018-
endif()
1019-
1020-
# Don't add the icucore target.
1021-
set(SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU)
1022-
foreach(item ${SWIFTLIB_SINGLE_LINK_LIBRARIES})
1023-
if(NOT "${item}" STREQUAL "icucore")
1024-
list(APPEND SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU "${item}")
1025-
endif()
1026-
endforeach()
1027-
10281006
# Link against system frameworks.
10291007
foreach(FRAMEWORK ${SWIFTLIB_SINGLE_FRAMEWORK_DEPENDS})
10301008
target_link_libraries(${target} PUBLIC "-framework ${FRAMEWORK}")
@@ -1093,7 +1071,6 @@ function(_add_swift_host_library_single target name)
10931071
DEPLOYMENT_VERSION_TVOS "${SWIFTLIB_DEPLOYMENT_VERSION_TVOS}"
10941072
DEPLOYMENT_VERSION_WATCHOS "${SWIFTLIB_DEPLOYMENT_VERSION_WATCHOS}"
10951073
RESULT_VAR_NAME link_flags
1096-
LINK_LIBRARIES_VAR_NAME link_libraries
10971074
LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories
10981075
)
10991076

@@ -1172,7 +1149,7 @@ function(_add_swift_host_library_single target name)
11721149
# import library targets when the library was added. Use that to adjust the
11731150
# link libraries.
11741151
if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
1175-
foreach(library_list LINK_LIBRARIES PRIVATE_LINK_LIBRARIES)
1152+
foreach(library_list PRIVATE_LINK_LIBRARIES)
11761153
set(import_libraries)
11771154
foreach(library ${SWIFTLIB_SINGLE_${library_list}})
11781155
# Ensure that the library is a target. If an absolute path was given,

0 commit comments

Comments
 (0)