Skip to content

Commit f28987b

Browse files
committed
Turn the last trunk-only patch into a perl substitution instead and reorganize the patches a bit
1 parent 7cabdfd commit f28987b

File tree

3 files changed

+11
-29
lines changed

3 files changed

+11
-29
lines changed

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

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,8 @@
22

33
patches_dir=$(dirname $(realpath -- "${BASH_SOURCE[0]}"))
44
cd ${1}
5+
git apply -v -C1 ${patches_dir}/swift-android.patch
56

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
20-
21-
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport)
22-
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift
7+
if [[ "${BUILD_SCHEME}" == "swift-6.2-branch" ]]; then
8+
git apply -v -C1 ${patches_dir}/swift-android-devel.patch
9+
fi

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

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

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,13 @@ for arch in $archs; do
433433
# use an out-of-tree build folder
434434
export SWIFT_BUILD_ROOT=${build_dir}/swift-project
435435

436+
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport)
437+
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift
438+
439+
# This `git grep` invocation in a trunk test fails in our Docker for some
440+
# reason, so just turn it into a plain `grep` again.
441+
perl -pi -e 's:"git",:#:' swift/test/Misc/verify-swift-feature-testing.test-sh
442+
436443
./swift/utils/build-script \
437444
$build_type_flag \
438445
--reconfigure \

0 commit comments

Comments
 (0)