File tree Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Expand file tree Collapse file tree 4 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,10 @@ option(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT
243243 "If not building stdlib, controls whether to build 'stdlib/toolchain' content"
244244 TRUE )
245245
246+ option (SWIFT_BUILD_STDLIB_CXX_MODULE
247+ "If not building stdlib, controls whether to build the Cxx module"
248+ TRUE )
249+
246250# In many cases, the CMake build system needs to determine whether to include
247251# a directory, or perform other actions, based on whether the stdlib or SDK is
248252# being built at all -- statically or dynamically. Please note that these
@@ -1272,6 +1276,10 @@ else()
12721276 add_subdirectory (stdlib/toolchain)
12731277 endif ()
12741278
1279+ if (SWIFT_BUILD_STDLIB_CXX_MODULE)
1280+ add_subdirectory (stdlib/public /Cxx)
1281+ endif ()
1282+
12751283 if (BUILD_SWIFT_CONCURRENCY_BACK_DEPLOYMENT_LIBRARIES)
12761284 # Build the back-deployed concurrency library.
12771285 add_subdirectory (stdlib/public /BackDeployConcurrency)
Original file line number Diff line number Diff line change @@ -1678,6 +1678,7 @@ function(add_swift_target_library name)
16781678 IS_SDK_OVERLAY
16791679 IS_STDLIB
16801680 IS_STDLIB_CORE
1681+ IS_SWIFT_ONLY
16811682 NOSWIFTRT
16821683 OBJECT_LIBRARY
16831684 SHARED
@@ -1814,7 +1815,7 @@ function(add_swift_target_library name)
18141815 endif ()
18151816
18161817 if (NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE AND
1817- NOT SWIFT_PREBUILT_CLANG)
1818+ NOT SWIFT_PREBUILT_CLANG AND NOT SWIFTLIB_IS_SWIFT_ONLY )
18181819 list (APPEND SWIFTLIB_DEPENDS clang)
18191820 endif ()
18201821
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS")
33 set (SWIFT_CXX_LIBRARY_KIND SHARED)
44endif ()
55
6- add_swift_target_library(swiftCxx ${SWIFT_CXX_LIBRARY_KIND} NO_LINK_NAME IS_STDLIB
6+ add_swift_target_library(swiftCxx ${SWIFT_CXX_LIBRARY_KIND} NO_LINK_NAME IS_STDLIB IS_SWIFT_ONLY
77 CxxConvertibleToCollection.swift
88 CxxDictionary.swift
99 CxxPair.swift
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ add_dependencies(sdk-overlay libstdcxx-modulemap)
127127#
128128# C++ Standard Library Overlay.
129129#
130- add_swift_target_library(swiftCxxStdlib STATIC NO_LINK_NAME IS_STDLIB
130+ add_swift_target_library(swiftCxxStdlib STATIC NO_LINK_NAME IS_STDLIB IS_SWIFT_ONLY
131131 std.swift
132132 String .swift
133133
You canβt perform that action at this time.
0 commit comments