Description
The NEW setting for CMake policy CMP0157 issn't compatible with the way swift-collections was built for Android on Windows. Apparently, this was fixed because https://ci-external.swift.org/job/swift-PR-windows/36088/ didn't fail (at this point). In a later CI run, however, it came up again: https://ci-external.swift.org/job/swift-PR-windows/36135/ It's not clear to me why this happens, but here are a few more details.
MSVC version was upgraded from 19.39.33523.0 to 19.42.34436.0, but this didn't change CMake (still at 3.29.2). A new config parameter was added as well, but this shouldn't impact anything other than the naming of the libraries:
@@ -1,4 +1,4 @@
-[2025-02-06 16:07:27] Building 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift-corelibs-foundation' to 'T:\703' for arch 'x86_64'...
+[2025-02-07 13:24:36] Building 'C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift-corelibs-foundation' to 'T:\703' for arch 'x86_64'...
cmake.exe -B T:\703 -S C:\Users\swift-ci\jenkins\workspace\swift-PR-windows\swift-corelibs-foundation -G Ninja
-D _SwiftCollections_SourceDIR=C:/Users/swift-ci/jenkins/workspace/swift-PR-windows/swift-collections
-D _SwiftFoundation_SourceDIR=C:/Users/swift-ci/jenkins/workspace/swift-PR-windows/swift-foundation
@@ -23,6 +23,7 @@
-D CMAKE_MAKE_PROGRAM=C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe
-D CMAKE_NINJA_FORCE_RESPONSE_FILE=YES
-D CMAKE_SHARED_LINKER_FLAGS=--ld-path=T:/5/bin/ld.lld
+-D CMAKE_STATIC_LIBRARY_PREFIX_Swift=lib
-D CMAKE_Swift_COMPILER=T:/5/bin/swiftc.exe
-D CMAKE_Swift_COMPILER_TARGET=x86_64-unknown-linux-android
-D CMAKE_Swift_COMPILER_WORKS==
Attaching the full build logs as well: swift-PR-windows-36088-android.log and swift-PR-windows-36135-android.log