Skip to content

[CMake] Introduce SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT option #26379

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
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
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ option(SWIFT_BUILD_STATIC_SDK_OVERLAY
"Build static variants of the Swift SDK overlay"
FALSE)

option(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT
"If not building stdlib, controls whether to build 'stdlib/toolchain' content"
TRUE)

# In many cases, the CMake build system needs to determine whether to include
# a directory, or perform other actions, based on whether the stdlib or SDK is
# being built at all -- statically or dynamically. Please note that these
Expand Down Expand Up @@ -1078,7 +1082,9 @@ endif()
if(SWIFT_BUILD_STDLIB)
add_subdirectory(stdlib)
else()
add_subdirectory(stdlib/toolchain)
if(SWIFT_BUILD_STDLIB_EXTRA_TOOLCHAIN_CONTENT)
add_subdirectory(stdlib/toolchain)
endif()

# Some tools (e.g. swift-reflection-dump) rely on a host swiftReflection, so
# ensure we build that when building tools.
Expand Down