Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1656,8 +1656,11 @@ function(add_swift_library name)
# Add dependencies on the (not-yet-created) custom lipo target.
foreach(DEP ${SWIFTLIB_LINK_LIBRARIES})
if (NOT "${DEP}" STREQUAL "icucore")
add_dependencies(${VARIANT_NAME}
"${DEP}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
if("${SWIFT_SDK_${sdk}_OBJECT_FORMAT}" STREQUAL "MACHO")
add_dependencies(${VARIANT_NAME} "${DEP}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
else()
add_dependencies(${VARIANT_NAME} "${DEP}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
endif()
endif()
endforeach()

Expand Down Expand Up @@ -1781,13 +1784,22 @@ function(add_swift_library name)
set(VARIANT_SUFFIX "-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
if(TARGET "swift-stdlib${VARIANT_SUFFIX}" AND
TARGET "swift-test-stdlib${VARIANT_SUFFIX}")
if("${SWIFT_SDK_${sdk}_OBJECT_FORMAT}" STREQUAL "MACHO")
set(shared_lipo_target ${lipo_target})
set(static_lipo_target ${lipo_target_static})
else()
set(shared_lipo_target ${lipo_target}-${arch})
if(TARGET "${lipo_target_static}")
set(static_lipo_target ${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}-static)
endif()
endif()
add_dependencies("swift-stdlib${VARIANT_SUFFIX}"
${lipo_target}
${lipo_target_static})
${shared_lipo_target}
${static_lipo_target})
if(NOT "${name}" IN_LIST FILTERED_UNITTESTS)
add_dependencies("swift-test-stdlib${VARIANT_SUFFIX}"
${lipo_target}
${lipo_target_static})
${shared_lipo_target}
${static_lipo_target})
endif()
endif()
endforeach()
Expand Down