Skip to content

Commit b0ddace

Browse files
Try gating the Darwin dependencies on SWIFT_ENABLE_REFLECTION
1 parent edade50 commit b0ddace

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

stdlib/private/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
if(SWIFT_BUILD_SDK_OVERLAY OR (SWIFT_BUILD_TEST_SUPPORT_MODULES AND NOT SWIFT_BUILD_DYNAMIC_SDK_OVERLAY_default))
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))
25
# SwiftPrivateThreadExtras makes use of Darwin/Glibc, which is part of the
36
# SDK overlay. If the SDK overlay doesn't build by default, then it should
47
# be available in the SDK and DifferentiationUnittest can still be built.
8+
# However, the overlay in the SDK requires the standard library to have
9+
# reflection enabled.
510
if(SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING)
611
add_subdirectory(DifferentiationUnittest)
712
endif()
@@ -14,7 +19,10 @@ if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
1419
add_subdirectory(StdlibCollectionUnittest)
1520
endif()
1621

17-
if(SWIFT_BUILD_SDK_OVERLAY OR (SWIFT_BUILD_TEST_SUPPORT_MODULES AND NOT SWIFT_BUILD_DYNAMIC_SDK_OVERLAY_default))
22+
if(SWIFT_BUILD_SDK_OVERLAY
23+
OR (SWIFT_BUILD_TEST_SUPPORT_MODULES
24+
AND NOT SWIFT_BUILD_DYNAMIC_SDK_OVERLAY_default
25+
AND SWIFT_ENABLE_REFLECTION))
1826
add_subdirectory(SwiftPrivateLibcExtras)
1927
add_subdirectory(SwiftPrivateThreadExtras)
2028

0 commit comments

Comments
 (0)