Skip to content

Commit 435d4b4

Browse files
committed
build: add control of the build of Cxx module in -stdlib
This adds the ability to control the C++ interop module in the -stdlib build separately from "extra toolchain content". This is helpful for Windows where we bootstrap the entire toolchain and do not have a stdlib built when building tools.
1 parent aa8eda0 commit 435d4b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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
@@ -1265,6 +1269,9 @@ else()
12651269

12661270
if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
12671271
add_subdirectory(stdlib/toolchain)
1272+
endif()
1273+
1274+
if(SWIFT_BUILD_STDLIB_CXX_MODULE)
12681275
add_subdirectory(stdlib/public/Cxx)
12691276
endif()
12701277

0 commit comments

Comments
 (0)