Skip to content

Commit a32b479

Browse files
committed
build: custom import libraries are not needed for host libraries
1 parent 4a93f70 commit a32b479

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -774,19 +774,7 @@ function(_add_swift_host_library_single target)
774774
CXX_STANDARD 14)
775775
endif()
776776

777-
if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
778-
if("${libkind}" STREQUAL "SHARED")
779-
# Each dll has an associated .lib (import library); since we may be
780-
# building on a non-DLL platform (not windows), create an imported target
781-
# for the library which created implicitly by the dll.
782-
add_custom_command_target(${target}_IMPORT_LIBRARY
783-
OUTPUT "${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/${target}.lib"
784-
DEPENDS "${target}")
785-
add_library(${target}_IMPLIB SHARED IMPORTED GLOBAL)
786-
set_property(TARGET "${target}_IMPLIB" PROPERTY
787-
IMPORTED_LOCATION "${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/${target}.lib")
788-
add_dependencies(${target}_IMPLIB ${${target}_IMPORT_LIBRARY})
789-
endif()
777+
if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
790778
set_property(TARGET "${target}" PROPERTY NO_SONAME ON)
791779
endif()
792780

0 commit comments

Comments
 (0)