Skip to content

Commit 75d0e99

Browse files
committed
[cxx-interop] Build swiftCxx overlay when SWIFT_BUILD_SDK_OVERLAY=NO
The C++ stdlib overlay binaries (`libswiftCxx` and `libswiftCxxStdlib`) are now a part of the toolchain, not the OS SDKs. This makes sure that `libswiftCxx` is built when building the toolchain separately from the stdlib. rdar://105799283
1 parent 5a3220e commit 75d0e99

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ endif()
6262

6363
add_subdirectory(SwiftShims/swift/shims)
6464
add_subdirectory(CommandLineSupport)
65+
add_subdirectory(Cxx)
6566
add_subdirectory(Threading)
6667

6768
# This static library is shared across swiftCore and swiftRemoteInspection
@@ -159,7 +160,6 @@ endif()
159160

160161
if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
161162
add_subdirectory(Platform)
162-
add_subdirectory(Cxx)
163163
endif()
164164

165165
if(SWIFT_BUILD_SDK_OVERLAY)

stdlib/public/Cxx/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ add_swift_target_library(swiftCxx ${SWIFT_CXX_LIBRARY_KIND} NO_LINK_NAME IS_STDL
2222
INSTALL_IN_COMPONENT compiler
2323
INSTALL_WITH_SHARED)
2424

25-
add_subdirectory(std)
25+
if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
26+
add_subdirectory(std)
27+
endif()
2628
add_subdirectory(cxxshim)

0 commit comments

Comments
 (0)