Skip to content

Conversation

@finagolfin
Copy link
Member

Hopefully, this stops the random flakes we've been seeing on the Android CI, tested by swift-android-sdk#10 externally first.

… stdlib, where it's picking up a module from another arch
@finagolfin
Copy link
Member Author

@shahmishal, this should avoid the flakes we've been seeing on the Android CI, by deleting this build directory for each Android arch after it has been installed.

@shahmishal shahmishal merged commit 5a64d90 into swiftlang:main Nov 3, 2025
1 check passed
# the build directory, or else we get errors like:
# error: could not find module '_Builtin_float' for target 'x86_64-unknown-linux-android'; found: aarch64-unknown-linux-android, at: /home/runner/work/_temp/swift-android-sdk/ndk/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/swift/android/_Builtin_float.swiftmodule
rm -f $ndk_installation/sysroot/usr/lib/swift
rm -rf $ndk_installation/sysroot/usr/lib/swift/android
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this right? Elsewhere we run ln -s $ndk_installation/lib/clang/$ndk_clang_version $swift_res_root/usr/lib/swift/clang, so maybe we should be deleting from $swift_res_root instead?

Maybe print out the path that is being delete here, and cross reference it with the error message failures like in CI run #60:

02:14:31  <unknown>:0: error: could not find module '_math' for target 'x86_64-unknown-linux-android'; found: aarch64-unknown-linux-android, at: /home/build-user/build/swift-project/Ninja-Release/swift-linux-x86_64/lib/swift/android/_math.swiftmodule/x86_64-unknown-linux-android

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that is what I was worried about too, that deleting these files in the build directory through the symlink may not work, but as I mentioned earlier, it does seem to work.

I will look into the underlying compiler issue this week and try to fix or work around the root cause of these flakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants