File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
swift-ci/sdks/android/scripts Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -208,10 +208,22 @@ header "Swift Android SDK build script"
208208swift_dir=$( realpath $( dirname " $swiftc " ) /..)
209209HOST=linux-x86_64
210210# HOST=$(uname -s -m | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
211+
212+ # in a Docker container, the pre-installed NDK is read-only,
213+ # but the build script needs to write to it to work around
214+ # https://github.com/swiftlang/swift-driver/pull/1822
215+ # so we copy it to a read-write location for the purposes of the build
216+ # this can all be removed once that PR lands
217+ mkdir -p ${build_dir} /ndk/
218+ ndk_home_tmp=${build_dir} /ndk/$( basename $ndk_home )
219+ cp -a $ndk_home $ndk_home_tmp
220+ ndk_home=$ndk_home_tmp
221+
211222ndk_installation=$ndk_home /toolchains/llvm/prebuilt/$HOST
212223
213224# ANDROID_NDK env needed by the swift-android.patch for:
214225# call ln -sf "${SWIFT_BUILD_PATH}/lib/swift" "${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib"
226+ export ANDROID_NDK_HOME=$ndk_home
215227export ANDROID_NDK=$ndk_home
216228
217229echo " Swift found at ${swift_dir} "
You can’t perform that action at this time.
0 commit comments