Skip to content

Commit bb4fe4e

Browse files
authored
Merge pull request #14564 from compnerd/export
runtime: fix build of the runtime tests for Windows
2 parents 943033e + bd41f66 commit bb4fe4e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

unittests/runtime/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
4747
$<TARGET_OBJECTS:swiftRuntime${SWIFT_PRIMARY_VARIANT_SUFFIX}>
4848
)
4949

50+
# The local stdlib implementation provides definitions of the swiftCore
51+
# interfaes to avoid pulling in swiftCore itself. Build the SwiftRuntimeTests
52+
# with swiftCore_EXPORTS to permit exporting the stdlib interfaces.
53+
target_compile_definitions(SwiftRuntimeTests
54+
PRIVATE
55+
swiftCore_EXPORTS)
56+
5057
# FIXME: cross-compile for all variants.
5158
target_link_libraries(SwiftRuntimeTests
5259
swiftCore${SWIFT_PRIMARY_VARIANT_SUFFIX}

0 commit comments

Comments
 (0)