Skip to content

Commit df94d00

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 add6699 commit df94d00

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
@@ -1068,6 +1068,10 @@ function(add_swift_target_library_single target name)
10681068
target_include_directories("${target}" SYSTEM PRIVATE
10691069
${SWIFTLIB_INCLUDE})
10701070
endif()
1071+
if(libkind STREQUAL STATIC)
1072+
set_property(TARGET "${target}" PROPERTY
1073+
PREFIX lib)
1074+
endif()
10711075
endif()
10721076

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

0 commit comments

Comments
 (0)