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"
208
208
swift_dir=$( realpath $( dirname " $swiftc " ) /..)
209
209
HOST=linux-x86_64
210
210
# 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
+
211
222
ndk_installation=$ndk_home /toolchains/llvm/prebuilt/$HOST
212
223
213
224
# ANDROID_NDK env needed by the swift-android.patch for:
214
225
# 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
215
227
export ANDROID_NDK=$ndk_home
216
228
217
229
echo " Swift found at ${swift_dir} "
You can’t perform that action at this time.
0 commit comments