Skip to content

Commit 7696a44

Browse files
committed
Remove upstreamed patches and turn the last modifications into perl substitutions instead.
1 parent f555f48 commit 7696a44

File tree

7 files changed

+19
-395
lines changed

7 files changed

+19
-395
lines changed

swift-ci/sdks/android/build-docker

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,16 @@ else
3838
./scripts/fetch-source.sh --source-dir ${WORKDIR}/source --swift-scheme release/6.2
3939
fi
4040
fi
41-
./patches/apply-patches.sh ${WORKDIR}/source/swift-project
41+
42+
# This `git grep` invocation in a trunk test fails in our Docker for some
43+
# reason, so just turn it into a plain `grep` again.
44+
perl -pi -e 's:"git",:#:' ${WORKDIR}/source/swift-project/swift/test/Misc/verify-swift-feature-testing.test-sh
45+
46+
# Work around swiftlang/swift-driver#1822 for now
47+
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#" ${WORKDIR}/source/swift-project/swift/utils/build-script-impl
48+
49+
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport)
50+
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' ${WORKDIR}/source/swift-project/swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift
4251

4352
mkdir -p ${WORKDIR}/products
4453
chmod ugo+rwx ${WORKDIR}/products

swift-ci/sdks/android/build-local

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,15 @@ fi
5555

5656
# Check-out and patch the sources
5757
./scripts/fetch-source.sh --source-dir ${WORKDIR}/source --swift-tag ${SWIFT_TAG}
58-
./patches/apply-patches.sh ${WORKDIR}/source/swift-project
58+
# This `git grep` invocation in a trunk test fails in our Docker for some
59+
# reason, so just turn it into a plain `grep` again.
60+
perl -pi -e 's:"git",:#:' ${WORKDIR}/source/swift-project/swift/test/Misc/verify-swift-feature-testing.test-sh
61+
62+
# Work around swiftlang/swift-driver#1822 for now
63+
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#" ${WORKDIR}/source/swift-project/swift/utils/build-script-impl
64+
65+
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport)
66+
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' ${WORKDIR}/source/swift-project/swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift
5967

6068
mkdir -p ${WORKDIR}/products
6169

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

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

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

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

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

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

0 commit comments

Comments
 (0)