Skip to content

Commit 7cc5035

Browse files
compnerdegorzhdan
authored andcommitted
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. (cherry picked from commit 435d4b4)
1 parent 59d915e commit 7cc5035

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
@@ -1270,6 +1274,9 @@ else()
12701274

12711275
if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
12721276
add_subdirectory(stdlib/toolchain)
1277+
endif()
1278+
1279+
if(SWIFT_BUILD_STDLIB_CXX_MODULE)
12731280
add_subdirectory(stdlib/public/Cxx)
12741281
endif()
12751282

0 commit comments

Comments
 (0)