Skip to content

Commit 5a64d90

Browse files
authored
Android: avoid compiler issue swiftlang/swift#55637 when building the stdlib, where it's picking up a module from another arch (swiftlang#507)
1 parent be302a8 commit 5a64d90

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

swift-ci/sdks/android/scripts/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,11 @@ for arch in $archs; do
498498
--foundation-cmake-options=-DCMAKE_SHARED_LINKER_FLAGS= \
499499
--cross-compile-append-host-target-to-destdir=False
500500
# --extra-cmake-options='-DCMAKE_EXTRA_LINK_FLAGS="-Wl,-z,max-page-size=16384"'
501-
# need to remove symlink that gets created in the NDK to the previous arch's build
502-
# or else we get errors like:
501+
# need to remove the arch-specific portion of the Swift resource dir in
502+
# the build directory, through this symlink that we create in the NDK to
503+
# the build directory, or else we get errors like:
503504
# 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
504-
rm -f $ndk_installation/sysroot/usr/lib/swift
505+
rm -rf $ndk_installation/sysroot/usr/lib/swift/android
505506
quiet_popd
506507
groupend
507508
done

0 commit comments

Comments
 (0)