Skip to content

Commit 3826628

Browse files
authored
Merge pull request #2984 from gottesmm/cmake_rename_host_library_to_force_build_for_host_sdk
2 parents 166ac9f + 034441a commit 3826628

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ endfunction()
377377
# [IS_STDLIB]
378378
# [IS_STDLIB_CORE]
379379
# [IS_SDK_OVERLAY]
380+
# [FORCE_BUILD_FOR_HOST_SDK]
380381
# INSTALL_IN_COMPONENT comp
381382
# source1 [source2 source3 ...])
382383
#
@@ -440,12 +441,15 @@ endfunction()
440441
# INSTALL_IN_COMPONENT comp
441442
# The Swift installation component that this library belongs to.
442443
#
444+
# FORCE_BUILD_FOR_HOST_SDK
445+
# Regardless of the defaults, also build this library for the host SDK.
446+
#
443447
# source1 ...
444448
# Sources to add into this library
445449
function(_add_swift_library_single target name)
446450
set(SWIFTLIB_SINGLE_options
447451
SHARED OBJECT_LIBRARY IS_STDLIB IS_STDLIB_CORE IS_SDK_OVERLAY
448-
TARGET_LIBRARY HOST_LIBRARY
452+
TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
449453
API_NOTES_NON_OVERLAY DONT_EMBED_BITCODE)
450454
cmake_parse_arguments(SWIFTLIB_SINGLE
451455
"${SWIFTLIB_SINGLE_options}"
@@ -934,6 +938,7 @@ endfunction()
934938
# [IS_STDLIB]
935939
# [IS_STDLIB_CORE]
936940
# [TARGET_LIBRARY]
941+
# [FORCE_BUILD_FOR_HOST_SDK]
937942
# INSTALL_IN_COMPONENT comp
938943
# DEPLOYMENT_VERSION_IOS version
939944
# source1 [source2 source3 ...])
@@ -1016,12 +1021,15 @@ endfunction()
10161021
# DEPLOYMENT_VERSION_IOS
10171022
# The minimum deployment version to build for if this is an iOS library.
10181023
#
1024+
# FORCE_BUILD_FOR_HOST_SDK
1025+
# Regardless of the defaults, also build this library for the host SDK.
1026+
#
10191027
# source1 ...
10201028
# Sources to add into this library.
10211029
function(add_swift_library name)
10221030
set(SWIFTLIB_options
10231031
SHARED OBJECT_LIBRARY IS_STDLIB IS_STDLIB_CORE IS_SDK_OVERLAY
1024-
TARGET_LIBRARY HOST_LIBRARY
1032+
TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
10251033
API_NOTES_NON_OVERLAY DONT_EMBED_BITCODE HAS_SWIFT_CONTENT)
10261034
cmake_parse_arguments(SWIFTLIB
10271035
"${SWIFTLIB_options}"
@@ -1102,7 +1110,7 @@ function(add_swift_library name)
11021110
# SDKs building the variants of this library.
11031111
list_intersect(
11041112
"${SWIFTLIB_TARGET_SDKS}" "${SWIFT_SDKS}" SWIFTLIB_TARGET_SDKS)
1105-
if(SWIFTLIB_HOST_LIBRARY)
1113+
if(SWIFTLIB_FORCE_BUILD_FOR_HOST_SDK)
11061114
list_union(
11071115
"${SWIFTLIB_TARGET_SDKS}" "${SWIFT_HOST_VARIANT_SDK}"
11081116
SWIFTLIB_TARGET_SDKS)
@@ -1209,7 +1217,7 @@ function(add_swift_library name)
12091217
${SWIFTLIB_IS_STDLIB_CORE_keyword}
12101218
${SWIFTLIB_IS_SDK_OVERLAY_keyword}
12111219
${SWIFTLIB_TARGET_LIBRARY_keyword}
1212-
${SWIFTLIB_HOST_LIBRARY_keyword}
1220+
${SWIFTLIB_FORCE_BUILD_FOR_HOST_SDK_keyword}
12131221
INSTALL_IN_COMPONENT "${SWIFTLIB_INSTALL_IN_COMPONENT}"
12141222
DEPLOYMENT_VERSION_IOS "${SWIFTLIB_DEPLOYMENT_VERSION_IOS}"
12151223
)

stdlib/public/Reflection/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_swift_library(swiftReflection TARGET_LIBRARY HOST_LIBRARY
1+
add_swift_library(swiftReflection TARGET_LIBRARY FORCE_BUILD_FOR_HOST_SDK
22
Demangle.cpp
33
MetadataSource.cpp
44
Remangle.cpp

0 commit comments

Comments
 (0)