Skip to content

Commit fd74b30

Browse files
committed
build: remove PRIVATE_LINK_LIBRARIES from _add_swift_host_library_single
1 parent 5d1c760 commit fd74b30

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ function(_add_swift_host_library_single target name)
755755
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
756756
LINK_FLAGS
757757
LLVM_LINK_COMPONENTS
758-
PRIVATE_LINK_LIBRARIES
759758
SWIFT_COMPILE_FLAGS)
760759

761760
cmake_parse_arguments(SWIFTLIB_SINGLE
@@ -1143,36 +1142,6 @@ function(_add_swift_host_library_single target name)
11431142
target_link_directories(${target} PRIVATE
11441143
${library_search_directories})
11451144

1146-
# Adjust the linked libraries for windows targets. On Windows, the link is
1147-
# performed against the import library, and the runtime uses the dll. Not
1148-
# doing so will result in incorrect symbol resolution and linkage. We created
1149-
# import library targets when the library was added. Use that to adjust the
1150-
# link libraries.
1151-
if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
1152-
foreach(library_list PRIVATE_LINK_LIBRARIES)
1153-
set(import_libraries)
1154-
foreach(library ${SWIFTLIB_SINGLE_${library_list}})
1155-
# Ensure that the library is a target. If an absolute path was given,
1156-
# then we do not have an import library associated with it. This occurs
1157-
# primarily with ICU (which will be an import library). Import
1158-
# libraries are only associated with shared libraries, so add an
1159-
# additional check for that as well.
1160-
set(import_library ${library})
1161-
if(TARGET ${library})
1162-
get_target_property(type ${library} TYPE)
1163-
if(${type} STREQUAL "SHARED_LIBRARY")
1164-
set(import_library ${library}_IMPLIB)
1165-
endif()
1166-
endif()
1167-
list(APPEND import_libraries ${import_library})
1168-
endforeach()
1169-
set(SWIFTLIB_SINGLE_${library_list} ${import_libraries})
1170-
endforeach()
1171-
endif()
1172-
1173-
target_link_libraries("${target}" PRIVATE
1174-
${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
1175-
11761145
# NOTE(compnerd) use the C linker language to invoke `clang` rather than
11771146
# `clang++` as we explicitly link against the C++ runtime. We were previously
11781147
# actually passing `-nostdlib++` to avoid the C++ runtime linkage.

0 commit comments

Comments
 (0)