Skip to content

Commit a41b4a8

Browse files
committed
SwiftReflectionTest: enable builds on non-Apple targets
Ensure that the swift-reflection-test binary is built for Windows by default. This is preventing tests from executing on Windows. There are dependencies which were already specified for Linux even, the tool just was disabled due to an invalid check.
1 parent cca638a commit a41b4a8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

stdlib/private/SwiftReflectionTest/CMakeLists.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ if (SWIFT_INCLUDE_TESTS)
99
SWIFT_MODULE_DEPENDS_TVOS Darwin
1010
SWIFT_MODULE_DEPENDS_WATCHOS Darwin
1111
SWIFT_MODULE_DEPENDS_LINUX Glibc
12+
SWIFT_MODULE_DEPENDS_WINDOWS MSVCRT
1213
INSTALL_IN_COMPONENT stdlib-experimental
1314
DARWIN_INSTALL_NAME_DIR "${SWIFT_DARWIN_STDLIB_PRIVATE_INSTALL_NAME_DIR}")
1415

1516
foreach(SDK ${SWIFT_SDKS})
16-
if("${SDK}" IN_LIST SWIFT_APPLE_PLATFORMS)
17-
foreach(ARCH ${SWIFT_SDK_${SDK}_ARCHITECTURES})
18-
set(VARIANT_SUFFIX "-${SWIFT_SDK_${SDK}_LIB_SUBDIR}-${ARCH}")
19-
add_dependencies(
20-
"swiftSwiftReflectionTest${VARIANT_SUFFIX}"
21-
"swift-reflection-test${VARIANT_SUFFIX}")
22-
endforeach()
23-
endif()
17+
foreach(ARCH ${SWIFT_SDK_${SDK}_ARCHITECTURES})
18+
set(VARIANT_SUFFIX "-${SWIFT_SDK_${SDK}_LIB_SUBDIR}-${ARCH}")
19+
add_dependencies("swiftSwiftReflectionTest${VARIANT_SUFFIX}"
20+
"swift-reflection-test${VARIANT_SUFFIX}")
21+
endforeach()
2422
endforeach()
2523
endif()

0 commit comments

Comments
 (0)