Skip to content

Commit 43cdf6a

Browse files
committed
[cxx-interop] Allow disabling Cxx build when building stdlib
This makes it possible to pass `SWIFT_BUILD_STDLIB_CXX_MODULE=FALSE` to CMake to disable Cxx and CxxStdlib modules when building the Swift stdlib or the SDK overlay. rdar://108206321
1 parent 1960739 commit 43cdf6a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ option(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT
244244
TRUE)
245245

246246
option(SWIFT_BUILD_STDLIB_CXX_MODULE
247-
"If not building stdlib, controls whether to build the Cxx module"
247+
"Build the Cxx module and the CxxStdlib overlay module"
248248
TRUE)
249249

250250
# In many cases, the CMake build system needs to determine whether to include

stdlib/public/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ endif()
6565

6666
add_subdirectory(SwiftShims/swift/shims)
6767
add_subdirectory(CommandLineSupport)
68-
add_subdirectory(Cxx)
68+
if(SWIFT_BUILD_STDLIB_CXX_MODULE)
69+
add_subdirectory(Cxx)
70+
endif()
6971
add_subdirectory(Threading)
7072

7173
# This static library is shared across swiftCore and swiftRemoteInspection

0 commit comments

Comments
 (0)