Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions swift-ci/sdks/android/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,11 @@ for arch in $archs; do
--foundation-cmake-options=-DCMAKE_SHARED_LINKER_FLAGS= \
--cross-compile-append-host-target-to-destdir=False
# --extra-cmake-options='-DCMAKE_EXTRA_LINK_FLAGS="-Wl,-z,max-page-size=16384"'
# need to remove symlink that gets created in the NDK to the previous arch's build
# or else we get errors like:
# need to remove the arch-specific portion of the Swift resource dir in
# the build directory, through this symlink that we create in the NDK to
# 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.

quiet_popd
groupend
done
Expand Down
Loading