Skip to content

Commit a0f2977

Browse files
committed
Remove the prebuilt Termux libsqlite dependency for the devel and trunk branches on the CI, replaced by the swift-toolchain-sqlite source
1 parent d5cf056 commit a0f2977

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/sdks.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
SWIFT_TAG="swift-DEVELOPMENT-SNAPSHOT-${LATEST_TOOLCHAIN_VERSION}-a"
3232
fi
3333
echo "tag=$SWIFT_TAG" >> $GITHUB_OUTPUT
34-
echo "key=$SWIFT_TAG-ndk-${NDK_VERSION}-patch-bundle" >> $GITHUB_OUTPUT
34+
echo "key=$SWIFT_TAG-ndk-${NDK_VERSION}-nosql-bundle" >> $GITHUB_OUTPUT
3535
- name: Get cached SDK bundle
3636
id: cache-bundle
3737
uses: actions/cache/restore@v4
@@ -153,7 +153,9 @@ jobs:
153153
for arch in aarch64 x86_64 armv7; do
154154
SDK_NAME=$(ls | grep swift-${{ matrix.version }}-android-$arch)
155155
SDK=`pwd`/$SDK_NAME
156-
perl -pi -e "s%/data/data/com.termux/files%$SDK%g" $SDK/usr/lib/pkgconfig/sqlite3.pc
156+
if [ ${{ matrix.version }} = 'release' ]; then
157+
perl -pi -e "s%/data/data/com.termux/files%$SDK%g" $SDK/usr/lib/pkgconfig/sqlite3.pc
158+
fi
157159
158160
./swift/utils/build-script -RA --skip-build-cmark --build-llvm=0 --android --android-ndk $ANDROID_NDK_LATEST_HOME --android-arch $arch --android-api-level $ANDROID_API_LEVEL --build-swift-tools=0 --native-swift-tools-path=${TOOLCHAIN}/bin --native-clang-tools-path=${TOOLCHAIN}/bin --cross-compile-hosts=android-$arch --cross-compile-deps-path=$SDK --skip-local-build --build-swift-static-stdlib --xctest --skip-early-swift-driver --install-swift --install-libdispatch --install-foundation --install-xctest --install-destdir=$SDK --swift-install-components='compiler;clang-resource-dir-symlink;license;stdlib;sdk-overlay' --cross-compile-append-host-target-to-destdir=False -b -p --install-llbuild --sourcekit-lsp --skip-early-swiftsyntax
159161

swift-android-ci-release.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ diff --git a/sourcekit-lsp/Sources/sourcekit-lsp/SourceKitLSP.swift b/sourcekit-
6363

6464
extension AbsolutePath {
6565
public init?(argument: String) {
66+
diff --git a/sourcekit-lsp/Utilities/build-script-helper.py b/sourcekit-lsp/Utilities/build-script-helper.py
67+
index bd31bec..4469cab 100755
68+
--- a/sourcekit-lsp/Utilities/build-script-helper.py
69+
+++ b/sourcekit-lsp/Utilities/build-script-helper.py
70+
@@ -129,7 +129,7 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace) -> List[str]:
71+
swiftpm_args += [
72+
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
73+
# SwiftPM will otherwise try to compile against GNU strerror_r on
74+
- '-Xlinker', '-landroid-spawn',
75+
+ '-Xlinker', '-landroid-spawn', '--pkg-config-path', os.path.join(os.path.split(args.cross_compile_config)[0], 'lib/pkgconfig'),
76+
# Android and fail.
77+
'-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE',
78+
]
6679
From 355649608eb168652ff103d2a2029ba9539eea4b
6780
From: Jake Petroules <[email protected]>
6881
Date: Sun, 17 Nov 2024 02:21:37 -0800

swift-android-ci.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ index bd31bec..4469cab 100755
3838
swiftpm_args += [
3939
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
4040
# SwiftPM will otherwise try to compile against GNU strerror_r on
41-
+ '-Xlinker', '-landroid-spawn', '--pkg-config-path', os.path.join(os.path.split(args.cross_compile_config)[0], 'lib/pkgconfig'),
41+
+ '-Xlinker', '-landroid-spawn',
4242
# Android and fail.
4343
'-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE',
4444
]

0 commit comments

Comments
 (0)