@@ -377,6 +377,7 @@ endfunction()
377
377
# [IS_STDLIB]
378
378
# [IS_STDLIB_CORE]
379
379
# [IS_SDK_OVERLAY]
380
+ # [FORCE_BUILD_FOR_HOST_SDK]
380
381
# INSTALL_IN_COMPONENT comp
381
382
# source1 [source2 source3 ...])
382
383
#
@@ -440,12 +441,15 @@ endfunction()
440
441
# INSTALL_IN_COMPONENT comp
441
442
# The Swift installation component that this library belongs to.
442
443
#
444
+ # FORCE_BUILD_FOR_HOST_SDK
445
+ # Regardless of the defaults, also build this library for the host SDK.
446
+ #
443
447
# source1 ...
444
448
# Sources to add into this library
445
449
function (_add_swift_library_single target name )
446
450
set (SWIFTLIB_SINGLE_options
447
451
SHARED OBJECT_LIBRARY IS_STDLIB IS_STDLIB_CORE IS_SDK_OVERLAY
448
- TARGET_LIBRARY HOST_LIBRARY
452
+ TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
449
453
API_NOTES_NON_OVERLAY DONT_EMBED_BITCODE )
450
454
cmake_parse_arguments (SWIFTLIB_SINGLE
451
455
"${SWIFTLIB_SINGLE_options} "
@@ -934,6 +938,7 @@ endfunction()
934
938
# [IS_STDLIB]
935
939
# [IS_STDLIB_CORE]
936
940
# [TARGET_LIBRARY]
941
+ # [FORCE_BUILD_FOR_HOST_SDK]
937
942
# INSTALL_IN_COMPONENT comp
938
943
# DEPLOYMENT_VERSION_IOS version
939
944
# source1 [source2 source3 ...])
@@ -1016,12 +1021,15 @@ endfunction()
1016
1021
# DEPLOYMENT_VERSION_IOS
1017
1022
# The minimum deployment version to build for if this is an iOS library.
1018
1023
#
1024
+ # FORCE_BUILD_FOR_HOST_SDK
1025
+ # Regardless of the defaults, also build this library for the host SDK.
1026
+ #
1019
1027
# source1 ...
1020
1028
# Sources to add into this library.
1021
1029
function (add_swift_library name )
1022
1030
set (SWIFTLIB_options
1023
1031
SHARED OBJECT_LIBRARY IS_STDLIB IS_STDLIB_CORE IS_SDK_OVERLAY
1024
- TARGET_LIBRARY HOST_LIBRARY
1032
+ TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
1025
1033
API_NOTES_NON_OVERLAY DONT_EMBED_BITCODE HAS_SWIFT_CONTENT )
1026
1034
cmake_parse_arguments (SWIFTLIB
1027
1035
"${SWIFTLIB_options} "
@@ -1102,7 +1110,7 @@ function(add_swift_library name)
1102
1110
# SDKs building the variants of this library.
1103
1111
list_intersect (
1104
1112
"${SWIFTLIB_TARGET_SDKS} " "${SWIFT_SDKS} " SWIFTLIB_TARGET_SDKS )
1105
- if (SWIFTLIB_HOST_LIBRARY )
1113
+ if (SWIFTLIB_FORCE_BUILD_FOR_HOST_SDK )
1106
1114
list_union (
1107
1115
"${SWIFTLIB_TARGET_SDKS} " "${SWIFT_HOST_VARIANT_SDK} "
1108
1116
SWIFTLIB_TARGET_SDKS )
@@ -1209,7 +1217,7 @@ function(add_swift_library name)
1209
1217
${SWIFTLIB_IS_STDLIB_CORE_keyword}
1210
1218
${SWIFTLIB_IS_SDK_OVERLAY_keyword}
1211
1219
${SWIFTLIB_TARGET_LIBRARY_keyword}
1212
- ${SWIFTLIB_HOST_LIBRARY_keyword }
1220
+ ${SWIFTLIB_FORCE_BUILD_FOR_HOST_SDK_keyword }
1213
1221
INSTALL_IN_COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT} "
1214
1222
DEPLOYMENT_VERSION_IOS "${SWIFTLIB_DEPLOYMENT_VERSION_IOS} "
1215
1223
)
0 commit comments