Skip to content

Commit ef037a4

Browse files
committed
stdlib: adjust the name for static libraries on Windows
Windows names static libraries with a `lib` prefix and a `lib` suffix. This differentiates them from the import libraries which have no prefix and a `lib` suffix. This adjustment enables the parallel installation of import libraries and static library variants for a given module. This is required to support static and dynamic library co-existence in Swift.
1 parent 62bd4f2 commit ef037a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/cmake/modules/AddSwiftStdlib.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,10 @@ function(add_swift_target_library_single target name)
10801080
target_include_directories("${target}" SYSTEM PRIVATE
10811081
${SWIFTLIB_INCLUDE})
10821082
endif()
1083+
if(libkind STREQUAL STATIC)
1084+
set_property(TARGET "${target}" PROPERTY
1085+
PREFIX lib)
1086+
endif()
10831087
endif()
10841088

10851089
if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")

0 commit comments

Comments
 (0)