1- if (SWIFT_BUILD_SDK_OVERLAY
2- OR (SWIFT_BUILD_TEST_SUPPORT_MODULES
3- AND NOT SWIFT_BUILD_DYNAMIC_SDK_OVERLAY_default
4- AND (SWIFT_ENABLE_REFLECTION
5- OR NOT SWIFT_HOST_VARIANT_SDK IN_LIST SWIFT_DARWIN_PLATFORMS)))
1+ if (SWIFT_BUILD_SDK_OVERLAY)
62 # SwiftPrivateThreadExtras makes use of Darwin/Glibc, which is part of the
7- # SDK overlay. If the SDK overlay doesn't build by default, then it should
8- # be available in the SDK and DifferentiationUnittest can still be built.
9- # However, the overlay in the Apple SDKs requires the standard library to
10- # have reflection enabled.
3+ # SDK overlay. It can't be built separately from the SDK overlay.
114 if (SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING)
125 add_subdirectory (DifferentiationUnittest)
136 endif ()
7+ endif ()
8+
9+ if (SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
1410 add_subdirectory (SwiftPrivate)
1511 add_subdirectory (RuntimeUnittest)
1612 add_subdirectory (StdlibUnicodeUnittest)
@@ -22,7 +18,9 @@ if(SWIFT_BUILD_SDK_OVERLAY
2218 # SwiftPrivateThreadExtras to ensure that the dependency targets are setup in
2319 # the correct order for Windows.
2420 add_subdirectory (StdlibUnittest)
21+ endif ()
2522
23+ if (SWIFT_BUILD_SDK_OVERLAY)
2624 add_subdirectory (OSLog)
2725
2826 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
0 commit comments