-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[windows][toolchain] Run non-executable Swift Runtime tests for aarch64 Android #79185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows][toolchain] Run non-executable Swift Runtime tests for aarch64 Android #79185
Conversation
@swift-ci please test Windows |
The build failed with an unrelated error and didn't reach the test stage. Investigating whether this is existing or due to my config adjustments for testing:
|
461698b
to
7856bac
Compare
Rebased and skipped build of ExperimentalRuntime for Android for the moment. Let's see if that gets us to the test stage. @swift-ci please test Windows |
The build failed because the NEW setting for CMake policy CMP0157 isn't compatible with Swift's legacy driver. This is a known issue. Let's try again with the OLD setting in the respective dependencies. swiftlang/swift-testing#944 |
With the CMake policy workaround we successfully avoided the CMP0157 issue. However, the build had test failures for Swift Windows and thus didn't reach the test stage for Android:
|
7856bac
to
e53973c
Compare
@swift-ci please test Windows |
swiftlang/swift-testing#944 |
The Overall pass-rate is now above 50% for android-aarch64
|
swiftlang/swift-testing#944 |
We didn't reach the test phase due to an unrelated build error in swift-corelibs-foundation:
swiftlang/swift-testing#944 |
swiftlang/swift-testing#944 |
Down to 187 failures
|
Do you know why so many fewer tests are discovered on the Windows CI compared to the linux CI, around 8k less? I also see that 2k more tests are unsupported when cross-compiling for Android on the Windows CI, though that is true for the community Android CI which runs on linux also, ie almost 2k more are unsupported. |
Thanks for sharing your observation! After Checking again, it turns out that the latter includes the former and I switched to use that now (there is yet another target |
swiftlang/swift-testing#944 |
Nice work, that looks pretty similar to the community Android CI results, which are run on a linux host instead. |
28e13f1
to
e2dc4da
Compare
Rebased, sorted out patches, trying again swiftlang/swift-testing#944 |
The issue on Windows remains. Let's track this down in a separate PR #79738 On Linux 3 tests failed. That's likely related to my changes:
|
Let's see if the above patch is effective as a workaround. Also, it appears that swift-testing has the same issue as swiftlang/swift-corelibs-foundation#5180 Let's see if we can reproduce it in CI. @swift-ci please test Windows |
CI bot confused the ticket link with a PR link so checkout failed. Let's try again. @swift-ci please test Windows |
aeeb793
to
da580fe
Compare
Split off the target-specific substitutions changes into #79998 Once the test is green, I will remove them here together with the utility patches. |
Yet another unrelated error prevented the build from reaching the Android Swift Runtime tests.. When building swift-foundation with SPM for testing, we pull in a WinSDK header that defines 128-bit integers. Apparently, the (outdated?) Clang we ship can't process them. Error is:
The issue was discussed a while ago in https://forums.swift.org/t/128bit-types-on-windows/65013, but it appears that the resulting fix never landed https://reviews.llvm.org/D121497 @compnerd Do you remember if that was the last state of affairs here? |
Apparently a fix for this is in the works in LLVM upstream: llvm/llvm-project#130993 |
swiftlang/swift-installer-scripts#400 |
swiftlang/swift-installer-scripts#400 |
9c6c541
to
f43d829
Compare
PR-test reached Android tests. It took 5hr 46min in total. Validation tests failed to resolve, because I missed this patch. Trying again. swiftlang/swift-installer-scripts#400 |
Much better now. PR-test took 5hr 38min in total.
|
f43d829
to
c740703
Compare
@swift-ci please smoke test |
The x64 mainline bot is configured to run these tests as soon as they land. However, should wait until we got a successful build after #80007. In a next step we might want to enable them as pre-merge tests as well via #79997. |
@swift-ci please smoke test Linux |
We are see test failures on nightly Windows bot: https://ci-external.swift.org/job/swift-main-windows-toolchain/1155/
|
@@ -2747,6 +2750,7 @@ config.substitutions.insert(0, ('%check-c-header-in-clang', | |||
# Verifies that a C++ file can be compiled without warnings except for some exceptions. | |||
config.substitutions.insert(0, ('%check-cxx-header-in-clang', | |||
'%clangxx -fsyntax-only -x c++-header ' + extraCheckWarningFlags + | |||
' --sysroot %r ' % config.variant_sdk + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@weliveindetail, it appears this change broke several tests on the community Android CI, which cross-compiles them from a linux host for Android:
FAIL: Swift(android-aarch64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift (4507 of 18928)
******************** TEST 'Swift(android-aarch64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift' FAILED ********************
Exit Code: 1
Command Output (stderr):
--
RUN: at line 1: rm -rf "/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp" && mkdir -p "/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp"
+ rm -rf /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp
+ mkdir -p /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp
RUN: at line 2: /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/bin/swift-frontend -target aarch64-unknown-linux-android -sdk /home/swiftci/android/ndk/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -resource-dir /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/lib/swift -module-cache-path /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/swift-test-results/aarch64-unknown-linux-android/clang-module-cache -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10 /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test/Interop/SwiftToCxx/class/nested-classes-in-cxx.swift -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp/classes.h
+ /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/bin/swift-frontend -target aarch64-unknown-linux-android -sdk /home/swiftci/android/ndk/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -resource-dir /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/lib/swift -module-cache-path /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/swift-test-results/aarch64-unknown-linux-android/clang-module-cache -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10 /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test/Interop/SwiftToCxx/class/nested-classes-in-cxx.swift -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp/classes.h
RUN: at line 3: '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/bin/clang++' -fmodules-cache-path='/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/swift-test-results/aarch64-unknown-linux-android/clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot '/home/swiftci/android/ndk/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot' -F '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test/Inputs/clang-importer-sdk'/frameworks -I /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/include -isysroot '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test'/Inputs/clang-importer-sdk -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -I/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/./lib/swift /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/bin/clang++' -fmodules-cache-path='/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/swift-test-results/aarch64-unknown-linux-android/clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot '/home/swiftci/android/ndk/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot' -F '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test/Inputs/clang-importer-sdk'/frameworks -I /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/include -isysroot '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test'/Inputs/clang-importer-sdk -std=c++17 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -I/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/./lib/swift /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/bin/clang++' -fmodules-cache-path='/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/swift-test-results/aarch64-unknown-linux-android/clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot '/home/swiftci/android/ndk/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot' -F '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test/Inputs/clang-importer-sdk'/frameworks -I /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/include -isysroot '/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test'/Inputs/clang-importer-sdk -std=c++20 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -I/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/./lib/swift /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17
+ /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/bin/clang++ -fmodules-cache-path=/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/swift-test-results/aarch64-unknown-linux-android/clang-module-cache -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot /home/swiftci/android/ndk/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -F /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test/Inputs/clang-importer-sdk/frameworks -I /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/llvm-linux-x86_64/include -isysroot /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/swift/test/Inputs/clang-importer-sdk -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -I/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/./lib/swift /home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17
/home/swiftci/jenkins/workspace/oss-swift-RA-linux-ubuntu-24.04-android-arm64/buildbot_linux/swift-linux-x86_64/test-android-aarch64/Interop/SwiftToCxx/class/Output/nested-classes-in-cxx.swift.tmp/classes.h:29:10: fatal error: 'cstdint' file not found
29 | #include <cstdint>
| ^~~~~~~~~
1 error generated.
Are these Interop/SwiftToCxx
tests passing for you on a Windows host when cross-compiled to Android? The good news is that this change has no effect when natively running the compiler validation suite on an Android AArch64 device, the same tests pass there. 😃
It looks like you made this change because otherwise the file was not checked against the NDK, so I think you are right to add this flag for Android, but it will require more flags to work properly on the linux-hosted CI.
I plan to spend time in the coming month fixing the remaining tests on the Android CI run with a linux host, so it would be good to then communicate with whoever is checking these on your Android CI for a Windows host to make sure we get the same results.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our SDK has cstdint
at swift-6.1-RELEASE-android-24-0.1.artifactbundle/swift-6.1-release-android-24-sdk/android-27c-sysroot/usr/include/c++/v1/cstdint
. I wonder if we manually add <sysroot>/usr/include/c++/v1/
to the include paths if it might find it…
% find $ANDROID_HOME/ndk -name cstdint
~/Library/Android/sdk/ndk/27.0.12077973/sources/cxx-stl/system/include/cstdint
~/Library/Android/sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/darwin-x86_64/include/c++/4.9.x/cstdint
~/Library/Android/sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/c++/v1/cstdint
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I tried that and then saw some other C++ macro errors. I've seen some weird logic in the clang Driver related to the "gcc-toolchain" which allows it to find the C++ headers automatically in the system linux sysroot, but I think not in the Android sysroot. This is probably caused by that, but then it should fail on Windows also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK clang on Windows always needs --sysroot
in order to cross-compile for Android, because the location of the NDK cannot be inferred. This is one of the places that lacked the argument. It worked when it merged, but looking at this run of the nightly bot, it has regressed already:
FAIL: Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift (4495 of 18856)
I didn't finish the integration of the downstream filters. In particular, the feature to skip tests in LIT doesn't seem to work in Swift. #80148 unblocked the nightly bots, but also removed visibility of these failures.
IMHO we won't get away without such build-platform specific filters. At least to mark parts of the test suite as "not yet supported" in the mid-term. The test suite is too clunky and toolchain requirements are too diverse. Also, we cannot specify the build-OS in the REQUIRES
/UNSUPPORTED
/etc. clauses of individual tests (and it would add another layer of mess to the test suite if we did that).
It would be great to fix the skip
feature, so we can exclude flaky and xpass tests per build-platform. xfail
works. On Windows we load the filter for Android here:
Lines 2230 to 2231 in 22a3ec0
# Filter known issues when testing on Windows | |
Load-LitTestOverrides $PSScriptRoot/windows-swift-android-lit-test-overrides.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK clang on Windows always needs --sysroot in order to cross-compile for Android, because the location of the NDK cannot be inferred. This is one of the places that lacked the argument.
Oh yeah, as I said above, this change appears right, but incomplete when cross-compiling.
It worked when it merged, but looking at this run of the nightly bot, it has regressed already
I'm surprised it ever worked on your Windows host, as it's listed as XFAIL for AArch64 in that output, and fails as expected for the other Android arches on Windows too:
FAIL: Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift (4495 of 18856)
******************** TEST 'Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
rm -rf "T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp" && mkdir -p "T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp"
# executed command: rm -rf 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp'
# executed command: mkdir -p 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp'
# RUN: at line 2
t:\5\bin\swift-frontend.exe -target x86_64-unknown-linux-android -sdk T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -resource-dir T:/x86_64-unknown-linux-android28/Runtime/./lib/swift -module-cache-path T:\x86_64-unknown-linux-android28\Runtime\swift-test-results\x86_64-unknown-linux-android\clang-module-cache -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10 C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain\swift\test\Interop\SwiftToCxx\class\nested-classes-in-cxx.swift -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h
# executed command: 't:\5\bin\swift-frontend.exe' -target x86_64-unknown-linux-android -sdk T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -resource-dir T:/x86_64-unknown-linux-android28/Runtime/./lib/swift -module-cache-path 'T:\x86_64-unknown-linux-android28\Runtime\swift-test-results\x86_64-unknown-linux-android\clang-module-cache' -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10 'C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain\swift\test\Interop\SwiftToCxx\class\nested-classes-in-cxx.swift' -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h'
# RUN: at line 3
't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && 't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++17 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && 't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++20 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17
# executed command: 't:\\5\\bin\\clang++.exe' '-fmodules-cache-path=T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk/frameworks' -I 'T:\x86_64-unknown-linux-android28\LLVM\include' -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test/Inputs/clang-importer-sdk' -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h' -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17
# .---command stderr------------
# | T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h:29:10: fatal error: 'cstdint' file not found
# | 29 | #include <cstdint>
# | | ^~~~~~~~~
# | 1 error generated.
# `-----------------------------
# error: command failed with exit status: 1
Good to see you're still running the compiler validation tests for armv7 though, as that was broken on the community Android CI for a year or so before we finally shut it down, and I think you're the first to run the tests for Android i686. 😃
The test suite is too clunky and toolchain requirements are too diverse. Also, we cannot specify the build-OS in the REQUIRES/UNSUPPORTED/etc. clauses of individual tests (and it would add another layer of mess to the test suite if we did that).
Understood, we can chip those lit fixes in over time.
Right now, I'm interested in fixing the compiler validation suite for Android when running on linux, which may cause regressions on your Windows host running the Android tests. Thanks for linking that Windows CI so I can check that: 😺 is there someone at TBC in charge of those Android tests who I can discuss such failures with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there someone at TBC in charge of those Android tests who I can discuss such failures with?
I am in another busy project this summer. For the moment I guess @compnerd might be able to help you here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
He seems super busy too though. :| My concern is that when I start fixing the Android tests on linux, some may then break on Windows. I can then check that in the toolchain CI you linked above and try to fix them, but may not be able to, as I don't use Windows myself. But I suppose if you don't have anybody in charge of these Android tests run on Windows, most of my changes will fix tests on Windows too, so let's just see how it goes...
…itly adding the sysroot and target triple (#81312) @weliveindetail noticed that these header checks when cross-compiling are incorrectly checked against the host C and C++ headers and target, so he added the cross-compilation sysroot for the C++ header check alone more than a month ago in #79185. However, that broke several C++ Interop tests when running the compiler validation suite for Android on both [the Windows toolchain CI](https://ci-external.swift.org/job/swift-main-windows-toolchain/) and [the community Android CI on a linux host](https://ci-external.swift.org/job/oss-swift-RA-linux-ubuntu-24.04-android-arm64/): ``` FAIL: Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift (4495 of 18856) ******************** TEST 'Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift' FAILED ******************** Exit Code: 1 Command Output (stdout): -- # RUN: at line 1 rm -rf "T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp" && mkdir -p "T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp" # executed command: rm -rf 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp' # executed command: mkdir -p 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp' # RUN: at line 2 t:\5\bin\swift-frontend.exe -target x86_64-unknown-linux-android -sdk T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -resource-dir T:/x86_64-unknown-linux-android28/Runtime/./lib/swift -module-cache-path T:\x86_64-unknown-linux-android28\Runtime\swift-test-results\x86_64-unknown-linux-android\clang-module-cache -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10 C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain\swift\test\Interop\SwiftToCxx\class\nested-classes-in-cxx.swift -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h # executed command: 't:\5\bin\swift-frontend.exe' -target x86_64-unknown-linux-android -sdk T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -resource-dir T:/x86_64-unknown-linux-android28/Runtime/./lib/swift -module-cache-path 'T:\x86_64-unknown-linux-android28\Runtime\swift-test-results\x86_64-unknown-linux-android\clang-module-cache' -swift-version 4 -define-availability 'SwiftStdlib 9999:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999' -define-availability 'SwiftStdlib 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2' -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' -define-availability 'SwiftStdlib 5.2:macOS 10.15.4, iOS 13.4, watchOS 6.2, tvOS 13.4' -define-availability 'SwiftStdlib 5.3:macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0' -define-availability 'SwiftStdlib 5.4:macOS 11.3, iOS 14.5, watchOS 7.4, tvOS 14.5' -define-availability 'SwiftStdlib 5.5:macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0' -define-availability 'SwiftStdlib 5.6:macOS 12.3, iOS 15.4, watchOS 8.5, tvOS 15.4' -define-availability 'SwiftStdlib 5.7:macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0' -define-availability 'SwiftStdlib 5.8:macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4' -define-availability 'SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0' -define-availability 'SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1' -define-availability 'SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -define-availability 'SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4' -define-availability 'SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999' -define-availability 'SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.1' -define-availability 'SwiftCompatibilitySpan 6.2:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0' -typo-correction-limit 10 'C:\Users\swift-ci\jenkins\workspace\swift-main-windows-toolchain\swift\test\Interop\SwiftToCxx\class\nested-classes-in-cxx.swift' -enable-library-evolution -typecheck -module-name Classes -clang-header-expose-decls=all-public -emit-clang-header-path 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h' # RUN: at line 3 't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && 't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++17 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 && 't:\\5\\bin\\clang++.exe' -fmodules-cache-path='T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot 'T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot' -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk'/frameworks -I T:\x86_64-unknown-linux-android28\LLVM\include -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test'/Inputs/clang-importer-sdk -std=c++20 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 # executed command: 't:\\5\\bin\\clang++.exe' '-fmodules-cache-path=T:\\x86_64-unknown-linux-android28\\Runtime\\swift-test-results\\x86_64-unknown-linux-android\\clang-module-cache' -fsyntax-only -x c++-header -Weverything -Werror -Wno-unused-macros -Wno-incomplete-module -Wno-auto-import -Wno-variadic-macros -Wno-c++98-compat-pedantic -Wno-poison-system-directories -Wno-unused-command-line-argument -Wno-nullability-extension --sysroot T:/android-ndk-r27c/toolchains/llvm/prebuilt/windows-x86_64/sysroot -F 'C:\\Users\\swift-ci\\jenkins\\workspace\\swift-main-windows-toolchain\\swift\\test\\Inputs\\clang-importer-sdk/frameworks' -I 'T:\x86_64-unknown-linux-android28\LLVM\include' -isysroot 'C:/Users/swift-ci/jenkins/workspace/swift-main-windows-toolchain/swift\\test/Inputs/clang-importer-sdk' -std=c++14 -Wno-padded -Wno-c11-extensions -D_LIBCPP_CSTDLIB -IT:/x86_64-unknown-linux-android28/Runtime/./lib/swift 'T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h' -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -std=c++17 # .---command stderr------------ # | T:\x86_64-unknown-linux-android28\Runtime\test-android-x86_64\Interop\SwiftToCxx\class\Output\nested-classes-in-cxx.swift.tmp/classes.h:29:10: fatal error: 'cstdint' file not found # | 29 | #include <cstdint> # | | ^~~~~~~~~ # | 1 error generated. # `----------------------------- # error: command failed with exit status: 1 ``` I experimented a bit and found that explicitly passing in the target triple fixed these tests, so this pull does that for C++ and also corrects the C header check.
We cross-compile the Swift runtime libs for the Android SDKs in the Windows toolchain. This patch adds a build step that runs non-executable tests for them.