Skip to content

[cxx-interop] Include Cxx and CxxStdlib modules in no-stdlib builds #65055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1265,6 +1265,7 @@ else()

if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
add_subdirectory(stdlib/toolchain)
add_subdirectory(stdlib/public/Cxx)
endif()

if (BUILD_SWIFT_CONCURRENCY_BACK_DEPLOYMENT_LIBRARIES)
Expand Down
3 changes: 2 additions & 1 deletion stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1678,6 +1678,7 @@ function(add_swift_target_library name)
IS_SDK_OVERLAY
IS_STDLIB
IS_STDLIB_CORE
IS_SWIFT_ONLY
NOSWIFTRT
OBJECT_LIBRARY
SHARED
Expand Down Expand Up @@ -1814,7 +1815,7 @@ function(add_swift_target_library name)
endif()

if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE AND
NOT SWIFT_PREBUILT_CLANG)
NOT SWIFT_PREBUILT_CLANG AND NOT SWIFTLIB_IS_SWIFT_ONLY)
list(APPEND SWIFTLIB_DEPENDS clang)
endif()

Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "WINDOWS")
set(SWIFT_CXX_LIBRARY_KIND SHARED)
endif()

add_swift_target_library(swiftCxx ${SWIFT_CXX_LIBRARY_KIND} NO_LINK_NAME IS_STDLIB
add_swift_target_library(swiftCxx ${SWIFT_CXX_LIBRARY_KIND} NO_LINK_NAME IS_STDLIB IS_SWIFT_ONLY
CxxConvertibleToCollection.swift
CxxDictionary.swift
CxxPair.swift
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/Cxx/std/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ add_dependencies(sdk-overlay libstdcxx-modulemap)
#
# C++ Standard Library Overlay.
#
add_swift_target_library(swiftCxxStdlib STATIC NO_LINK_NAME IS_STDLIB
add_swift_target_library(swiftCxxStdlib STATIC NO_LINK_NAME IS_STDLIB IS_SWIFT_ONLY
std.swift
String.swift

Expand Down