@@ -366,6 +366,7 @@ endfunction()
366
366
# [IS_STDLIB]
367
367
# [IS_STDLIB_CORE]
368
368
# [IS_SDK_OVERLAY]
369
+ # [FORCE_BUILD_FOR_HOST_SDK]
369
370
# INSTALL_IN_COMPONENT comp
370
371
# source1 [source2 source3 ...])
371
372
#
@@ -429,12 +430,15 @@ endfunction()
429
430
# INSTALL_IN_COMPONENT comp
430
431
# The Swift installation component that this library belongs to.
431
432
#
433
+ # FORCE_BUILD_FOR_HOST_SDK
434
+ # Regardless of the defaults, also build this library for the host SDK.
435
+ #
432
436
# source1 ...
433
437
# Sources to add into this library
434
438
function (_add_swift_library_single target name )
435
439
set (SWIFTLIB_SINGLE_options
436
440
SHARED OBJECT_LIBRARY IS_STDLIB IS_STDLIB_CORE IS_SDK_OVERLAY
437
- TARGET_LIBRARY HOST_LIBRARY
441
+ TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
438
442
API_NOTES_NON_OVERLAY DONT_EMBED_BITCODE )
439
443
cmake_parse_arguments (SWIFTLIB_SINGLE
440
444
"${SWIFTLIB_SINGLE_options} "
@@ -916,6 +920,7 @@ endfunction()
916
920
# [IS_STDLIB]
917
921
# [IS_STDLIB_CORE]
918
922
# [TARGET_LIBRARY]
923
+ # [FORCE_BUILD_FOR_HOST_SDK]
919
924
# INSTALL_IN_COMPONENT comp
920
925
# DEPLOYMENT_VERSION_IOS version
921
926
# source1 [source2 source3 ...])
@@ -998,12 +1003,15 @@ endfunction()
998
1003
# DEPLOYMENT_VERSION_IOS
999
1004
# The minimum deployment version to build for if this is an iOS library.
1000
1005
#
1006
+ # FORCE_BUILD_FOR_HOST_SDK
1007
+ # Regardless of the defaults, also build this library for the host SDK.
1008
+ #
1001
1009
# source1 ...
1002
1010
# Sources to add into this library.
1003
1011
function (add_swift_library name )
1004
1012
set (SWIFTLIB_options
1005
1013
SHARED OBJECT_LIBRARY IS_STDLIB IS_STDLIB_CORE IS_SDK_OVERLAY
1006
- TARGET_LIBRARY HOST_LIBRARY
1014
+ TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
1007
1015
API_NOTES_NON_OVERLAY DONT_EMBED_BITCODE HAS_SWIFT_CONTENT )
1008
1016
cmake_parse_arguments (SWIFTLIB
1009
1017
"${SWIFTLIB_options} "
@@ -1084,7 +1092,7 @@ function(add_swift_library name)
1084
1092
# SDKs building the variants of this library.
1085
1093
list_intersect (
1086
1094
"${SWIFTLIB_TARGET_SDKS} " "${SWIFT_SDKS} " SWIFTLIB_TARGET_SDKS )
1087
- if (SWIFTLIB_HOST_LIBRARY )
1095
+ if (SWIFTLIB_FORCE_BUILD_FOR_HOST_SDK )
1088
1096
list_union (
1089
1097
"${SWIFTLIB_TARGET_SDKS} " "${SWIFT_HOST_VARIANT_SDK} "
1090
1098
SWIFTLIB_TARGET_SDKS )
@@ -1191,7 +1199,7 @@ function(add_swift_library name)
1191
1199
${SWIFTLIB_IS_STDLIB_CORE_keyword}
1192
1200
${SWIFTLIB_IS_SDK_OVERLAY_keyword}
1193
1201
${SWIFTLIB_TARGET_LIBRARY_keyword}
1194
- ${SWIFTLIB_HOST_LIBRARY_keyword }
1202
+ ${SWIFTLIB_FORCE_BUILD_FOR_HOST_SDK_keyword }
1195
1203
INSTALL_IN_COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT} "
1196
1204
DEPLOYMENT_VERSION_IOS "${SWIFTLIB_DEPLOYMENT_VERSION_IOS} "
1197
1205
)
0 commit comments