diff --git a/.gitlab/ci/ctest_exclusions.cmake b/.gitlab/ci/ctest_exclusions.cmake index ed5e1dd694..a2789c3af8 100644 --- a/.gitlab/ci/ctest_exclusions.cmake +++ b/.gitlab/ci/ctest_exclusions.cmake @@ -34,13 +34,6 @@ if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "nvhpc_") ) endif() -if ("$ENV{CMAKE_CONFIGURATION}" STREQUAL "windows_vs2022_x64_ninja") - list(APPEND test_exclusions - # FIXME(#25573): This test failure needs further investigation. - "^SwiftMixLib$" - ) -endif() - string(REPLACE ";" "|" test_exclusions "${test_exclusions}") if (test_exclusions) set(test_exclusions "(${test_exclusions})") diff --git a/Tests/SwiftMixLib/CMakeLists.txt b/Tests/SwiftMixLib/CMakeLists.txt index d23c6bad0b..c2cfb8f4ff 100644 --- a/Tests/SwiftMixLib/CMakeLists.txt +++ b/Tests/SwiftMixLib/CMakeLists.txt @@ -10,3 +10,15 @@ target_link_libraries(Swifty PUBLIC SwiftMixedLib) add_executable(c_main main.c) target_link_libraries(c_main PUBLIC SwiftMixedLib) + +if(WIN32) + # TODO: On macOS and Linux, Swift has mechanism for determining what libraries + # an object, or objects from a static archive, need to link against, + # which is how the Swift driver is able to determine that `c_main` + # needs to link swiftCore. Windows does not have this mechanism. + # Eventually CMake should learn how to do this, explicitly forwarding + # the required library to the link command when linking a static + # archive containing Swift sources into something else, even if the + # linker language is Swift. + target_link_libraries(c_main PRIVATE swiftCore) +endif()