Skip to content

Commit

Permalink
Remove the prebuilt Termux libsqlite dependency for the devel and tru…
Browse files Browse the repository at this point in the history
…nk branches on the CI, replaced by the swift-toolchain-sqlite source
  • Loading branch information
finagolfin committed Dec 27, 2024
1 parent d5cf056 commit a0f2977
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
SWIFT_TAG="swift-DEVELOPMENT-SNAPSHOT-${LATEST_TOOLCHAIN_VERSION}-a"
fi
echo "tag=$SWIFT_TAG" >> $GITHUB_OUTPUT
echo "key=$SWIFT_TAG-ndk-${NDK_VERSION}-patch-bundle" >> $GITHUB_OUTPUT
echo "key=$SWIFT_TAG-ndk-${NDK_VERSION}-nosql-bundle" >> $GITHUB_OUTPUT
- name: Get cached SDK bundle
id: cache-bundle
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -153,7 +153,9 @@ jobs:
for arch in aarch64 x86_64 armv7; do
SDK_NAME=$(ls | grep swift-${{ matrix.version }}-android-$arch)
SDK=`pwd`/$SDK_NAME
perl -pi -e "s%/data/data/com.termux/files%$SDK%g" $SDK/usr/lib/pkgconfig/sqlite3.pc
if [ ${{ matrix.version }} = 'release' ]; then
perl -pi -e "s%/data/data/com.termux/files%$SDK%g" $SDK/usr/lib/pkgconfig/sqlite3.pc
fi
./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
Expand Down
13 changes: 13 additions & 0 deletions swift-android-ci-release.patch
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ diff --git a/sourcekit-lsp/Sources/sourcekit-lsp/SourceKitLSP.swift b/sourcekit-

extension AbsolutePath {
public init?(argument: String) {
diff --git a/sourcekit-lsp/Utilities/build-script-helper.py b/sourcekit-lsp/Utilities/build-script-helper.py
index bd31bec..4469cab 100755
--- a/sourcekit-lsp/Utilities/build-script-helper.py
+++ b/sourcekit-lsp/Utilities/build-script-helper.py
@@ -129,7 +129,7 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace) -> List[str]:
swiftpm_args += [
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
# SwiftPM will otherwise try to compile against GNU strerror_r on
- '-Xlinker', '-landroid-spawn',
+ '-Xlinker', '-landroid-spawn', '--pkg-config-path', os.path.join(os.path.split(args.cross_compile_config)[0], 'lib/pkgconfig'),
# Android and fail.
'-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE',
]
From 355649608eb168652ff103d2a2029ba9539eea4b
From: Jake Petroules <[email protected]>
Date: Sun, 17 Nov 2024 02:21:37 -0800
Expand Down
2 changes: 1 addition & 1 deletion swift-android-ci.patch
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ index bd31bec..4469cab 100755
swiftpm_args += [
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
# SwiftPM will otherwise try to compile against GNU strerror_r on
+ '-Xlinker', '-landroid-spawn', '--pkg-config-path', os.path.join(os.path.split(args.cross_compile_config)[0], 'lib/pkgconfig'),
+ '-Xlinker', '-landroid-spawn',
# Android and fail.
'-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE',
]
Expand Down

0 comments on commit a0f2977

Please sign in to comment.