Skip to content

Commit 8102b63

Browse files
authored
Merge pull request #63865 from apple/egorzhdan/cxx-toolchain-build
[cxx-interop] Build the C++ stdlib overlay when `SWIFT_BUILD_SDK_OVERLAY=NO`
2 parents ababdca + 1d5de34 commit 8102b63

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
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)

stdlib/public/Cxx/cxxshim/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,16 @@ foreach(sdk ${SWIFT_SDKS})
4343

4444
swift_install_in_component(FILES libcxxshim.modulemap libcxxshim.h
4545
DESTINATION "lib/swift/${arch_subdir}"
46-
COMPONENT sdk-overlay)
46+
COMPONENT compiler)
4747
if(SWIFT_BUILD_STATIC_STDLIB)
4848
swift_install_in_component(FILES libcxxshim.modulemap libcxxshim.h
4949
DESTINATION "lib/swift_static/${arch_subdir}"
50-
COMPONENT sdk-overlay)
50+
COMPONENT compiler)
5151
endif()
5252
endforeach()
5353
endforeach()
5454

5555
add_custom_target(libcxxshim_modulemap DEPENDS ${libcxxshim_modulemap_target_list})
5656
set_property(TARGET libcxxshim_modulemap PROPERTY FOLDER "Miscellaneous")
5757
add_dependencies(sdk-overlay libcxxshim_modulemap)
58+
add_dependencies(compiler libcxxshim_modulemap)

0 commit comments

Comments
 (0)