1- if (SWIFT_BUILD_SDK_OVERLAY)
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)))
26 # SwiftPrivateThreadExtras makes use of Darwin/Glibc, which is part of the
3- # SDK overlay. It can't be built separately from the SDK overlay.
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.
411 if (SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING)
512 add_subdirectory (DifferentiationUnittest)
613 endif ()
7- endif ()
8-
9- if (SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
1014 add_subdirectory (SwiftPrivate)
1115 add_subdirectory (RuntimeUnittest)
1216 add_subdirectory (StdlibUnicodeUnittest)
@@ -18,9 +22,7 @@ if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
1822 # SwiftPrivateThreadExtras to ensure that the dependency targets are setup in
1923 # the correct order for Windows.
2024 add_subdirectory (StdlibUnittest)
21- endif ()
2225
23- if (SWIFT_BUILD_SDK_OVERLAY)
2426 add_subdirectory (OSLog)
2527
2628 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
0 commit comments