mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Clang enforces a minimum 13.1 deployment target. The driver, API checker, and various tests assume 13.0 is a valid minimum. Update these to reflect the actual 13.1 minimum. Resolves rdar://84177900
38 lines
1.3 KiB
CMake
38 lines
1.3 KiB
CMake
# SwiftTestUtils.cmake
|
|
#
|
|
# Utility functions for Swift testing targets
|
|
|
|
# Get the possible build flavors for testing
|
|
function(get_swift_test_build_flavors build_flavors_out_var sdk)
|
|
set(build_flavors "default")
|
|
if(SWIFT_ENABLE_MACCATALYST AND "${sdk}" STREQUAL "OSX")
|
|
list(APPEND build_flavors "ios-like")
|
|
endif()
|
|
|
|
set(${build_flavors_out_var} ${build_flavors} PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
# Get the variant suffix for test targets and folders
|
|
function(get_swift_test_variant_suffix variant_suffix_out_var sdk arch build_flavor)
|
|
if(build_flavor STREQUAL "ios-like")
|
|
set(variant_suffix "-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-maccatalyst-${arch}")
|
|
else()
|
|
set(variant_suffix "-${SWIFT_SDK_${sdk}_LIB_SUBDIR}-${arch}")
|
|
endif()
|
|
|
|
set(${variant_suffix_out_var} "${variant_suffix}" PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
|
|
# Get the variant triple for test targets
|
|
function(get_swift_test_versioned_target_triple variant_triple_out_var sdk arch build_flavor)
|
|
if(build_flavor STREQUAL "ios-like")
|
|
# Use the macCatalyst target triple and compiler resources for the iOS-like build flavor.
|
|
set(variant_triple "${arch}-apple-ios13.1-macabi")
|
|
else()
|
|
get_versioned_target_triple(variant_triple ${sdk} ${arch} "${SWIFT_SDK_${sdk}_DEPLOYMENT_VERSION}")
|
|
endif()
|
|
|
|
set(${variant_triple_out_var} "${variant_triple}" PARENT_SCOPE)
|
|
endfunction()
|