Skip to content

Commit e920cb0

Browse files
committed
Turn the last modifications into perl substitutions instead and remove all non-6.2 patches
1 parent 7d85a1e commit e920cb0

File tree

4 files changed

+10
-43
lines changed

4 files changed

+10
-43
lines changed

swift-ci/sdks/android/patches/apply-patches.sh

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33
patches_dir=$(dirname $(realpath -- "${BASH_SOURCE[0]}"))
44
cd ${1}
55

6-
case "${BUILD_SCHEME}" in
7-
swift-*-branch)
8-
git apply -v -C1 ${patches_dir}/swift-android-devel.patch
9-
git apply -v -C1 ${patches_dir}/swift-android.patch
10-
;;
11-
development)
12-
git apply -v -C1 ${patches_dir}/swift-android.patch
13-
git apply -v -C1 ${patches_dir}/swift-android-trunk.patch
14-
;;
15-
*)
16-
echo "$0: invalid BUILD_SCHEME=${BUILD_SCHEME}"
17-
exit 1
18-
;;
19-
esac
6+
if [[ "${BUILD_SCHEME}" == "swift-6.2-branch" ]]; then
7+
git apply -v -C1 ${patches_dir}/swift-android-devel.patch
8+
else
9+
# This `git grep` invocation in a trunk test fails in our Docker for some
10+
# reason, so just turn it into a plain `grep` again.
11+
perl -pi -e 's:"git",:#:' swift/test/Misc/verify-swift-feature-testing.test-sh
12+
fi
13+
14+
# Work around swiftlang/swift-driver#1822 for now
15+
perl -pi -g -we "s#(call rm ... \".\{LIBDISPATCH_BUILD_DIR\}\"\n(\s+)fi\n)#\1\2if [[ -d \"\\\${ANDROID_NDK}\" ]]; then call ln -sf \"\\\${SWIFT_BUILD_PATH}/lib/swift\" \"\\\${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib\"; fi#" swift/utils/build-script-impl
2016

2117
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport)
2218
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift

swift-ci/sdks/android/patches/swift-android-trunk.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

swift-ci/sdks/android/patches/swift-android.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,6 @@ ndk_home=$ndk_home_tmp
235235
ndk_installation=$ndk_home/toolchains/llvm/prebuilt/$HOST
236236
ndk_clang_version=18
237237

238-
# ANDROID_NDK env needed by the swift-android.patch for:
239-
# call ln -sf "${SWIFT_BUILD_PATH}/lib/swift" "${ANDROID_NDK}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib"
240-
export ANDROID_NDK_HOME=$ndk_home
241-
export ANDROID_NDK=$ndk_home
242-
243238
echo "Swift found at ${swift_dir}"
244239
if [[ ! -z "${host_toolchain}" ]]; then
245240
echo "Host toolchain found at ${host_toolchain}"

0 commit comments

Comments
 (0)