Skip to content

Commit 9897716

Browse files
committed
unittests: fixes for Swift's custom build system
Because we do not have proper libraries in our system, we cannot attach interface link libraries, especially in light of the incorporate_object_library implementation. Explicitly add the dependency on DbgHelp for the unit tests.
1 parent 1f1e523 commit 9897716

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

unittests/runtime/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
3030
list(APPEND PLATFORM_TARGET_LINK_LIBRARIES
3131
${EXECINFO_LIBRARY}
3232
)
33+
elseif(SWIFT_HOST_VARIANT STREQUAL windows)
34+
list(APPEND PLATFORM_TARGET_LINK_LIBRARIES DbgHelp)
3335
endif()
3436

3537
add_swift_unittest(SwiftRuntimeTests

unittests/runtime/LongTests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
2525
list(APPEND PLATFORM_TARGET_LINK_LIBRARIES
2626
${EXECINFO_LIBRARY}
2727
)
28+
elseif(SWIFT_HOST_VARIANT STREQUAL windows)
29+
list(APPEND PLATFORM_TARGET_LINK_LIBRARIES DbgHelp)
2830
endif()
2931

3032
add_swift_unittest(SwiftRuntimeLongTests

0 commit comments

Comments
 (0)