@@ -689,6 +689,7 @@ function(add_swift_target_library_single target name)
689689 OBJECT_LIBRARY
690690 SHARED
691691 STATIC
692+ NO_LINK_NAME
692693 INSTALL_WITH_SHARED)
693694 set (SWIFTLIB_SINGLE_single_parameter_options
694695 ARCHITECTURE
@@ -727,6 +728,8 @@ function(add_swift_target_library_single target name)
727728
728729 translate_flag(${SWIFTLIB_SINGLE_STATIC} "STATIC"
729730 SWIFTLIB_SINGLE_STATIC_keyword)
731+ translate_flag(${SWIFTLIB_SINGLE_NO_LINK_NAME} "NO_LINK_NAME"
732+ SWIFTLIB_SINGLE_NO_LINK_NAME_keyword)
730733 if (DEFINED SWIFTLIB_SINGLE_BOOTSTRAPPING)
731734 set (BOOTSTRAPPING_arg "BOOTSTRAPPING" ${SWIFTLIB_SINGLE_BOOTSTRAPPING} )
732735 endif ()
@@ -896,6 +899,7 @@ function(add_swift_target_library_single target name)
896899 ${SWIFTLIB_SINGLE_IS_SDK_OVERLAY_keyword}
897900 ${embed_bitcode_arg}
898901 ${SWIFTLIB_SINGLE_STATIC_keyword}
902+ ${SWIFTLIB_SINGLE_NO_LINK_NAME_keyword}
899903 ENABLE_LTO "${SWIFTLIB_SINGLE_ENABLE_LTO} "
900904 INSTALL_IN_COMPONENT "${install_in_component} "
901905 MACCATALYST_BUILD_FLAVOR "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR} "
@@ -1124,7 +1128,7 @@ function(add_swift_target_library_single target name)
11241128 # Set compile and link flags for the non-static target.
11251129 # Do these LAST.
11261130 set (target_static)
1127- if (SWIFTLIB_SINGLE_IS_STDLIB AND SWIFTLIB_SINGLE_STATIC)
1131+ if (SWIFTLIB_SINGLE_IS_STDLIB AND SWIFTLIB_SINGLE_STATIC AND NOT SWIFTLIB_SINGLE_INSTALL_WITH_SHARED )
11281132 set (target_static "${target} -static" )
11291133
11301134 # We have already compiled Swift sources. Link everything into a static
@@ -1643,6 +1647,7 @@ function(add_swift_target_library name)
16431647 OBJECT_LIBRARY
16441648 SHARED
16451649 STATIC
1650+ NO_LINK_NAME
16461651 INSTALL_WITH_SHARED)
16471652 set (SWIFTLIB_single_parameter_options
16481653 DEPLOYMENT_VERSION_IOS
@@ -2137,6 +2142,7 @@ function(add_swift_target_library name)
21372142 ${name}
21382143 ${SWIFTLIB_SHARED_keyword}
21392144 ${SWIFTLIB_STATIC_keyword}
2145+ ${SWIFTLIB_NO_LINK_NAME_keyword}
21402146 ${SWIFTLIB_OBJECT_LIBRARY_keyword}
21412147 ${SWIFTLIB_INSTALL_WITH_SHARED_keyword}
21422148 ${SWIFTLIB_SOURCES}
@@ -2405,19 +2411,14 @@ function(add_swift_target_library name)
24052411 # If we built static variants of the library, create a lipo target for
24062412 # them.
24072413 set (lipo_target_static)
2408- if (SWIFTLIB_IS_STDLIB AND SWIFTLIB_STATIC)
2414+ if (SWIFTLIB_IS_STDLIB AND SWIFTLIB_STATIC AND NOT SWIFTLIB_INSTALL_WITH_SHARED )
24092415 set (THIN_INPUT_TARGETS_STATIC)
24102416 foreach (TARGET ${THIN_INPUT_TARGETS} )
24112417 list (APPEND THIN_INPUT_TARGETS_STATIC "${TARGET} -static" )
24122418 endforeach ()
24132419
2414- if (SWIFTLIB_INSTALL_WITH_SHARED)
2415- set (install_subdir "swift" )
2416- set (universal_subdir ${SWIFTLIB_DIR} )
2417- else ()
2418- set (install_subdir "swift_static" )
2419- set (universal_subdir ${SWIFTSTATICLIB_DIR} )
2420- endif ()
2420+ set (install_subdir "swift_static" )
2421+ set (universal_subdir ${SWIFTSTATICLIB_DIR} )
24212422
24222423 set (lipo_target_static
24232424 "${name} -${library_subdir} -static" )
0 commit comments