Skip to content

Commit e0d9b16

Browse files
committed
Only configure swift-reflection-dump if the host stdlib is requested
Since swift-reflection-dump is a host-only tool, for iOS-only builds or other builds where the host SDK isn't configured and the standard library isn't building, the swift-reflection-dump tool will fail to find libswiftReflection. rdar://problem/25858390
1 parent 7ad6a8b commit e0d9b16

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,8 +746,13 @@ if(SWIFT_BUILD_TOOLS)
746746
add_subdirectory(include)
747747
add_subdirectory(lib)
748748
add_subdirectory(tools)
749+
endif()
750+
751+
is_sdk_requested("${SWIFT_HOST_VARIANT_SDK}" SWIFT_HOST_SDK_REQUESTED)
752+
if(SWIFT_BUILD_TOOLS AND SWIFT_BUILD_STDLIB AND SWIFT_HOST_SDK_REQUESTED)
749753
add_subdirectory(tools/swift-reflection-dump)
750754
endif()
755+
751756
add_subdirectory(utils)
752757
add_subdirectory(stdlib)
753758

0 commit comments

Comments
 (0)