Skip to content

Commit

Permalink
swift: update from 5.8.1 to trunk Sep 4 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin committed Sep 5, 2023
1 parent ab5d3e6 commit 158f466
Show file tree
Hide file tree
Showing 19 changed files with 150 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
target_arch: [aarch64, arm, x86_64]
target_arch: [aarch64] #, arm, x86_64]
fail-fast: false
steps:
- name: Clone repository
Expand Down
6 changes: 3 additions & 3 deletions packages/libdispatch/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://github.com/apple/swift-corelibs-libdispatch
TERMUX_PKG_DESCRIPTION="The libdispatch project, for concurrency on multicore hardware"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@finagolfin"
TERMUX_PKG_VERSION="1:5.8"
TERMUX_PKG_SRCURL=https://github.com/apple/swift-corelibs-libdispatch/archive/swift-RELEASE.tar.gz
TERMUX_PKG_SHA256=391d2bcaea22c4aa980400c3a29b3d9991641aa62253b693c0b79c302eafd5a0
TERMUX_PKG_VERSION="1:5.10"
TERMUX_PKG_SRCURL=https://github.com/apple/swift-corelibs-libdispatch/archive/swift-DEVELOPMENT-SNAPSHOT-2023-09-04-a.tar.gz
TERMUX_PKG_SHA256=04162d1291cafb588c31106558fa8ea2d0be6ba08b570c19691a8140d7017fee
TERMUX_PKG_DEPENDS="libc++, libblocksruntime"
14 changes: 14 additions & 0 deletions packages/libdispatch/dispatch-dispatch.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/dispatch/dispatch.h b/dispatch/dispatch.h
index 0c7bdd4..35cb91d 100644
--- a/dispatch/dispatch.h
+++ b/dispatch/dispatch.h
@@ -39,6 +39,9 @@
#include <stdarg.h>
#include <string.h>
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+#if defined(__ANDROID__)
+#include <signal.h>
+#endif
#include <unistd.h>
#endif
#include <fcntl.h>
7 changes: 4 additions & 3 deletions packages/llbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ TERMUX_PKG_HOMEPAGE=https://github.com/apple/swift-llbuild
TERMUX_PKG_DESCRIPTION="A low-level build system, used by the Swift Package Manager"
TERMUX_PKG_LICENSE="Apache-2.0, NCSA"
TERMUX_PKG_MAINTAINER="@finagolfin"
TERMUX_PKG_VERSION=5.8
TERMUX_PKG_SRCURL=https://github.com/apple/swift-llbuild/archive/swift-RELEASE.tar.gz
TERMUX_PKG_SHA256=6345ae69ac9b8bb61b61f14871b322f83b1d08f70c261bd9a2f86a998c394c0c
TERMUX_PKG_VERSION=5.10
TERMUX_PKG_SRCURL=https://github.com/apple/swift-llbuild/archive/swift-DEVELOPMENT-SNAPSHOT-2023-09-04-a.tar.gz
TERMUX_PKG_SHA256=243ecafee41686ffaf9e0622bcb865dcd4c0f29710196d1cc8bdfe800b309c93
TERMUX_PKG_DEPENDS="libc++, libandroid-spawn, libsqlite"
TERMUX_PKG_NO_STATICSPLIT=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/products/libllbuild/include/llbuild/buildsystem.h b/products/libllbuild/include/llbuild/buildsystem.h
index d75b9cc3..3c7ccc7b 100644
--- a/products/libllbuild/include/llbuild/buildsystem.h
+++ b/products/libllbuild/include/llbuild/buildsystem.h
@@ -40,6 +40,9 @@ typedef HANDLE FD;
#else
#include <sys/types.h>
#endif // defined(__linux__) || defined(__GNU__)
+#if defined(__ANDROID__)
+#include <signal.h>
+#endif
#include <unistd.h>
typedef pid_t llbuild_pid_t;
typedef int FD;
56 changes: 56 additions & 0 deletions packages/swift/bionic-odr-checking-workarounds.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
diff --git a/swift-corelibs-libdispatch/dispatch/dispatch.h b/swift-corelibs-libdispatch/dispatch/dispatch.h
index 0c7bdd4..35cb91d 100644
--- a/swift-corelibs-libdispatch/dispatch/dispatch.h
+++ b/swift-corelibs-libdispatch/dispatch/dispatch.h
@@ -39,6 +39,9 @@
#include <stdarg.h>
#include <string.h>
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
+#if defined(__ANDROID__)
+#include <signal.h>
+#endif
#include <unistd.h>
#endif
#include <fcntl.h>
diff --git a/llbuild/products/libllbuild/include/llbuild/buildsystem.h b/llbuild/products/libllbuild/include/llbuild/buildsystem.h
index d75b9cc3..3c7ccc7b 100644
--- a/llbuild/products/libllbuild/include/llbuild/buildsystem.h
+++ b/llbuild/products/libllbuild/include/llbuild/buildsystem.h
@@ -40,6 +40,9 @@ typedef HANDLE FD;
#else
#include <sys/types.h>
#endif // defined(__linux__) || defined(__GNU__)
+#if defined(__ANDROID__)
+#include <signal.h>
+#endif
#include <unistd.h>
typedef pid_t llbuild_pid_t;
typedef int FD;
diff --git a/swift-tools-support-core/Sources/TSCclibc/include/indexstore_functions.h b/swift-tools-support-core/Sources/TSCclibc/include/indexstore_functions.h
index fb8ddab..4553ab0 100644
--- a/swift-tools-support-core/Sources/TSCclibc/include/indexstore_functions.h
+++ b/swift-tools-support-core/Sources/TSCclibc/include/indexstore_functions.h
@@ -17,6 +17,9 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
+#if defined(__ANDROID__)
+#include <signal.h>
+#endif
#include <time.h>

/**
diff --git a/swift-crypto/Sources/CCryptoBoringSSL/include/CCryptoBoringSSL_asn1.h b/swift-crypto/Sources/CCryptoBoringSSL/include/CCryptoBoringSSL_asn1.h
index 652fb89..c10e8ce 100644
--- a/swift-crypto/Sources/CCryptoBoringSSL/include/CCryptoBoringSSL_asn1.h
+++ b/swift-crypto/Sources/CCryptoBoringSSL/include/CCryptoBoringSSL_asn1.h
@@ -60,6 +60,9 @@

#include "CCryptoBoringSSL_base.h"

+#if defined(__ANDROID__)
+#include <signal.h>
+#endif
#include <time.h>

#include "CCryptoBoringSSL_bio.h"
52 changes: 29 additions & 23 deletions packages/swift/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ TERMUX_PKG_HOMEPAGE=https://swift.org/
TERMUX_PKG_DESCRIPTION="Swift is a high-performance system programming language"
TERMUX_PKG_LICENSE="Apache-2.0, NCSA"
TERMUX_PKG_MAINTAINER="@finagolfin"
TERMUX_PKG_VERSION=5.8.1
TERMUX_PKG_REVISION=1
SWIFT_RELEASE="RELEASE"
TERMUX_PKG_VERSION=5.10
SWIFT_RELEASE="DEVELOPMENT-SNAPSHOT-2023-09-04-a"
TERMUX_PKG_SRCURL=https://github.com/apple/swift/archive/swift-$SWIFT_RELEASE.tar.gz
TERMUX_PKG_SHA256=16c68b4c4872651d4fc7e361df7731b7cc2592b293473d41bd331cd1a1fc3887
TERMUX_PKG_SHA256=2bfa98cd1fcfbabd8572e7540bed4e850b35dff5f2b8a6ec6738931ff6cb3898
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_DEPENDS="clang, libandroid-glob, libandroid-posix-semaphore, libandroid-spawn, libcurl, libicu, libicu-static, libsqlite, libuuid, libxml2, libdispatch, llbuild, swift-sdk-${TERMUX_ARCH/_/-}"
TERMUX_PKG_BUILD_DEPENDS="rsync"
Expand Down Expand Up @@ -35,35 +34,43 @@ termux_step_post_get_source() {
mv .temp swift

declare -A library_checksums
library_checksums[swift-cmark]=89ad876b686192b806c61b390b076cf3cbb6459af6acdd3e93cd1e3d8a74c7f6
library_checksums[llvm-project]=f4b6a4b1589d48fa2295d2709b99d1bfbbc6bfb2778dc72a4d72da3c25ff5d92
library_checksums[swift-experimental-string-processing]=83714d2178d2a02de35e75dbe11ff2443695a65aaf1136e5a7b9f152716e75a6
library_checksums[swift-syntax]=5885ad4e0ac448c6d4be85b17c5dd28e825aedf3664cf1b928017fb81938f52a
library_checksums[swift-corelibs-libdispatch]=ec27aabf9b0500ad2abcc53b8902a7673d9871106097851ce226e2aa817d1b0e
library_checksums[swift-corelibs-foundation]=b71505ae557a15481c05bbfaaeee83047e109c285ce4c4c7e06ba79b1aea3f2c
library_checksums[swift-corelibs-xctest]=194180362ba8a18f60f4cc371ada705be2a51d317364055b17024bf9ae405e26
library_checksums[swift-llbuild]=2df6fa3d92a351df97f228148405462e3aebcd4f0077b17e0ee5f5514575aa68
library_checksums[swift-argument-parser]=a4d4c08cf280615fe6e00752ef60e28e76f07c25eb4706a9269bf38135cd9c3f
library_checksums[Yams]=ec1ad699c30f0db45520006c63a88cc1c946a7d7b36dff32a96460388c0a4af2
library_checksums[sourcekit-lsp]=0ad88c95df072ff430e72aa7dd2c7de7e60ab0888b8ebd8cff7e773c12257e53
library_checksums[swift-corelibs-xctest]=62c739e130c9682e9461694774990e9a7a8060e71738087cff4fe79fe6226680
library_checksums[swift-corelibs-foundation]=f0a410bb2929a2d8cf5f0ed70dec699e5af358166b370643b3a35b535853ad65
library_checksums[swift-collections]=575cf0f88d9068411f9acc6e3ca5d542bef1cc9e87dc5d69f7b5a1d5aec8c6b6
library_checksums[swift-crypto]=84cec042505e1c5bf3dd14a1bb18d0c06c5a9435b7b10a69709101b602285ff5
library_checksums[swift-driver]=5f405e82cdb22709dc15f6a128adf95d1edf88165a5ef1696aea2d6014d13888
library_checksums[swift-argument-parser]=4a10bbef290a2167c5cc340b39f1f7ff6a8cf4e1b5433b68548bf5f1e542e908
library_checksums[swift-syntax]=7d4ffb4368b9df826756da4e7edfa527488e7845aca70a73874ca3b7652b185b
library_checksums[swift-llbuild]=243ecafee41686ffaf9e0622bcb865dcd4c0f29710196d1cc8bdfe800b309c93
library_checksums[swift-corelibs-libdispatch]=04162d1291cafb588c31106558fa8ea2d0be6ba08b570c19691a8140d7017fee
library_checksums[swift-system]=865b8c380455eef27e73109835142920c60ae4c4f4178a3d12ad04acc83f1371
library_checksums[swift-driver]=576ba0b330f2dc1fde6979dcecfccbb13c43d76b118bc8b43ecef9e62332df84
library_checksums[swift-tools-support-core]=914c697ded28be930f5afc844bc5712d2f47c14c83fae945ecca0f49af200f70
library_checksums[swift-package-manager]=51967163d971aac66f9667d2a9387da3c25b70118bc1e82cef309759f7b1d272
library_checksums[indexstore-db]=d9ff209be9a43109a80f1b2948fd34f203e1d55a944b1a2ea34439a75e218dc1
library_checksums[sourcekit-lsp]=abc341ac3e05c01fe93949cdd72ee9aefc3b785a9f91ead32169764a1af6625e
library_checksums[swift-asn1]=f02d911cece4daa4b0e71ff1c1884e02dbb210ac2c9758c3fd2449ab79b45f3a
library_checksums[swift-tools-support-core]=189f3204846877c34bc9304ed06ceb2e817fe82b8efab67b3f835acb484bf3df
library_checksums[swift-package-manager]=17b6dd4cbe37ceaf2de583158ba3c34420f4a0d35a2d33723b659911ed4a39da
library_checksums[swift-cmark]=eaefc07e060ef98a022e86fec5152c12b6745bd4f518969c756069a220c5144b
library_checksums[indexstore-db]=7c0e9a11a80c4750459ad902c9379fdd85c4fe9d1a67f9fbff2d5e498e32f930
library_checksums[swift-certificates]=b762df25d82b5f0b95b1e2dfa7b44986455b6daad968cd631d8996d97ad7d604
library_checksums[swift-crypto]=a7b2f5c4887ccd728cdff5d1162b4d4d36bd6c2df9c0c31d5b9b73d341c5c1bb
library_checksums[llvm-project]=a0841f2cf726afd10ebd44eb09cde650b2cb328ee3806fd19535937dbba6c3b5
library_checksums[swift-experimental-string-processing]=420f7706ec3dfa2dbf8f71d46653c701be69f0b6c4af0712d2443100217e412b
library_checksums[Yams]=ec1ad699c30f0db45520006c63a88cc1c946a7d7b36dff32a96460388c0a4af2

for library in "${!library_checksums[@]}"; do \
GH_ORG="apple"
if [ "$library" = "swift-argument-parser" ]; then
SRC_VERSION="1.0.3"
SRC_VERSION="1.2.3"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-asn1" ]; then
SRC_VERSION="0.8.0"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-certificates" ]; then
SRC_VERSION="0.6.0"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-collections" ]; then
SRC_VERSION="1.0.1"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-crypto" ]; then
SRC_VERSION="2.2.3"
SRC_VERSION="2.5.0"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-system" ]; then
SRC_VERSION="1.1.1"
Expand Down Expand Up @@ -143,7 +150,6 @@ termux_step_make() {
}

termux_step_make_install() {
rm $TERMUX_PREFIX/lib/swift/pm/llbuild/libllbuild.so
rm $TERMUX_PREFIX/lib/swift/android/lib{dispatch,BlocksRuntime}.so
mv $TERMUX_PREFIX/lib/swift/android/lib[^_]*.so $TERMUX_PREFIX/opt/ndk-multilib/$TERMUX_ARCH-linux-android*/lib
mv $TERMUX_PREFIX/lib/swift/android/lib*.a $TERMUX_PREFIX/lib/swift/android/$SWIFT_ARCH
Expand Down
4 changes: 2 additions & 2 deletions packages/swift/clang-lib-Driver-ToolChain.cpp.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ index 469ef62f1a9d..218f5af748f4 100644
case ToolChain::CST_Libcxx:
- CmdArgs.push_back("-lc++");
+ CmdArgs.push_back("-lc++_shared");
if (Args.hasArg(options::OPT_fexperimental_library))
CmdArgs.push_back("-lc++experimental");
break;

case ToolChain::CST_Libstdcxx:
26 changes: 0 additions & 26 deletions packages/swift/swift-cmake.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
diff --git a/cmark/src/CMakeLists.txt b/cmark/src/CMakeLists.txt
index faabffa..65e23cc 100644
--- a/cmark/src/CMakeLists.txt
+++ b/cmark/src/CMakeLists.txt
@@ -162,7 +162,7 @@ if(CMARK_SHARED OR CMARK_STATIC)
set(CMARK_TARGETS_FILE ${CMAKE_CURRENT_BINARY_DIR}/cmarkTargets.cmake)
export(TARGETS ${CMARK_INSTALL} FILE ${CMARK_TARGETS_FILE})

- if(CMARK_THREADING AND NOT APPLE AND NOT MSVC)
+ if(CMARK_THREADING AND NOT APPLE AND NOT MSVC AND NOT ANDROID)
if(CMARK_SHARED)
target_link_libraries(${LIBRARY} pthread)
endif(CMARK_SHARED)
diff --git a/llvm-project/clang/runtime/CMakeLists.txt b/llvm-project/clang/runtime/CMakeLists.txt
index 61b1c60bf590..5b0d10a67699 100644
--- a/llvm-project/clang/runtime/CMakeLists.txt
Expand Down Expand Up @@ -44,19 +31,6 @@ index 1bcfc0734785..ddb77c91b22d 100644

install(DIRECTORY ../../include/indexstore
COMPONENT IndexStore
diff --git a/llvm-project/llvm/CMakeLists.txt b/llvm-project/llvm/CMakeLists.txt
index a888c4177fa5..6788a62fa8bd 100644
--- a/llvm-project/llvm/CMakeLists.txt
+++ b/llvm-project/llvm/CMakeLists.txt
@@ -625,7 +625,7 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
option (LLVM_ENABLE_BINDINGS "Build bindings." ON)

-if(UNIX)
+if(UNIX AND CMAKE_SIZEOF_VOID_P GREATER_EQUAL 8)
set(LLVM_ENABLE_ONDISK_CAS_default ON)
else()
set(LLVM_ENABLE_ONDISK_CAS_default OFF)
diff --git a/llvm-project/cmake/Modules/HandleCompilerRT.cmake b/llvm-project/cmake/Modules/HandleCompilerRT.cmake
index ac9e0871489d..b495cbfb5c2e 100644
--- a/llvm-project/cmake/Modules/HandleCompilerRT.cmake
Expand Down
12 changes: 12 additions & 0 deletions packages/swift/swift-host-llvm-utilities.patch.beforehostbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/swift/utils/swift_build_support/swift_build_support/products/llvm.py b/swift/utils/swift_build_support/swift_build_support/products/llvm.py
index 744dca10fca..7b5932882f2 100644
--- a/swift/utils/swift_build_support/swift_build_support/products/llvm.py
+++ b/swift/utils/swift_build_support/swift_build_support/products/llvm.py
@@ -231,6 +231,7 @@ class LLVM(cmake_product.CMakeProduct):

if self.args.skip_build or not self.args.build_llvm:
build_targets = ['llvm-tblgen', 'clang-resource-headers',
+ 'clang-pseudo-gen', 'clang-tidy-confusable-chars-gen',
'intrinsics_gen', 'clang-tablegen-targets']
if not self.args.build_toolchain_only:
build_targets.extend([
22 changes: 0 additions & 22 deletions packages/swift/swift-include-swift-AST-Expr.h.patch

This file was deleted.

6 changes: 3 additions & 3 deletions packages/swift/swift-remove-relative-rpaths.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ index aabc3f2e..168f939c 100644
if(NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
target_link_options(llbuildSwift PRIVATE "SHELL:-no-toolchain-stdlib-rpath")
- set_target_properties(llbuildSwift PROPERTIES
- INSTALL_RPATH "$ORIGIN:$ORIGIN/../../$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>")
- INSTALL_RPATH "$ORIGIN/../../$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>")
+# set_target_properties(llbuildSwift PROPERTIES
+ # INSTALL_RPATH "$ORIGIN:$ORIGIN/../../$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>")
+ # INSTALL_RPATH "$ORIGIN/../../$<LOWER_CASE:${CMAKE_SYSTEM_NAME}>")
endif()
endif()
set_target_properties(llbuildSwift PROPERTIES
Expand Down Expand Up @@ -58,7 +58,7 @@ diff --git a/swiftpm/Utilities/bootstrap b/swiftpm/Utilities/bootstrap
index 92c368a86..e9d43b599 100755
--- a/swiftpm/Utilities/bootstrap
+++ b/swiftpm/Utilities/bootstrap
@@ -744,7 +744,7 @@ def get_swiftpm_env_cmd(args):
@@ -746,7 +746,7 @@ def get_swiftpm_env_cmd(args):
env_cmd.append("SWIFTCI_USE_LOCAL_DEPS=1")
env_cmd.append("SWIFTPM_MACOS_DEPLOYMENT_TARGET=%s" % g_macos_deployment_target)

Expand Down
1 change: 1 addition & 0 deletions packages/swift/swift-sdk-aarch64.subpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ lib/swift/android/aarch64/*.swiftmodule
lib/swift/android/aarch64/glibc.modulemap
lib/swift/android/aarch64/libcxxshim.h
lib/swift/android/aarch64/libcxxshim.modulemap
lib/swift/android/aarch64/libcxxstdlibshim.h
lib/swift/android/aarch64/libswiftCompatibilityBytecodeLayouts.a
lib/swift/android/aarch64/libswiftCxx.a
lib/swift/android/aarch64/SwiftGlibc.h
Expand Down
1 change: 1 addition & 0 deletions packages/swift/swift-sdk-arm.subpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ lib/swift/android/armv7/*.swiftmodule
lib/swift/android/armv7/glibc.modulemap
lib/swift/android/armv7/libcxxshim.h
lib/swift/android/armv7/libcxxshim.modulemap
lib/swift/android/armv7/libcxxstdlibshim.h
lib/swift/android/armv7/libswiftCompatibilityBytecodeLayouts.a
lib/swift/android/armv7/libswiftCxx.a
lib/swift/android/armv7/SwiftGlibc.h
Expand Down
1 change: 1 addition & 0 deletions packages/swift/swift-sdk-x86-64.subpackage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ lib/swift/android/x86_64/*.swiftmodule
lib/swift/android/x86_64/glibc.modulemap
lib/swift/android/x86_64/libcxxshim.h
lib/swift/android/x86_64/libcxxshim.modulemap
lib/swift/android/x86_64/libcxxstdlibshim.h
lib/swift/android/x86_64/libswiftCompatibilityBytecodeLayouts.a
lib/swift/android/x86_64/libswiftCxx.a
lib/swift/android/x86_64/SwiftGlibc.h
Expand Down
2 changes: 1 addition & 1 deletion packages/swift/swift-utils-build-script-impl-flags.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ index b1d060328bc..218c9215260 100755
fi

@@ -2035,6 +2035,7 @@ for host in "${ALL_HOSTS[@]}"; do
-DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER:BOOL=$(true_false "${BUILD_RUNTIME_WITH_HOST_COMPILER}")
-DLIBDISPATCH_CMAKE_BUILD_TYPE:STRING="${LIBDISPATCH_BUILD_TYPE}"
-DSWIFT_PATH_TO_SWIFT_SYNTAX_SOURCE:PATH="${SWIFT_SYNTAX_SOURCE_DIR}"
-DSWIFT_ENABLE_BACKTRACING:BOOL=$(true_false "${SWIFT_ENABLE_BACKTRACING}")
+ -DSWIFT_CLANG_RESOURCE_DIR_SYMLINK_INSTALL_TARGET:STRING="../clang/${TERMUX_CLANG_VERSION}"
"${swift_cmake_options[@]}"
)
Expand Down
21 changes: 0 additions & 21 deletions packages/swift/swiftpm-Sources-Build-BuildPlan.swift.patch

This file was deleted.

14 changes: 7 additions & 7 deletions packages/swift/swiftpm-sqlite-dependency.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ diff --git a/swiftpm/Utilities/bootstrap b/swiftpm/Utilities/bootstrap
index 085056de..1ded1a90 100755
--- a/swiftpm/Utilities/bootstrap
+++ b/swiftpm/Utilities/bootstrap
@@ -827,6 +827,7 @@ def get_swiftpm_flags(args):
if '-android' in args.build_target:
build_flags.extend(["-Xswiftc", "-Xcc", "-Xswiftc", "-U_GNU_SOURCE"])
build_flags.extend(["-Xlinker", "-landroid-spawn"])
+ build_flags.extend(["--pkg-config-path", os.path.join(os.path.split(args.cross_compile_config)[0], 'lib/pkgconfig')])
@@ -834,6 +834,7 @@ def get_swiftpm_flags(args):
build_flags += ["--arch", "x86_64", "--arch", "arm64"]
elif cross_compile_hosts.startswith('android-'):
build_flags.extend(["--destination", args.cross_compile_config])
+ build_flags.extend(["--pkg-config-path", os.path.join(os.path.split(args.cross_compile_config)[0], "lib/pkgconfig")])
else:
error("cannot cross-compile for %s" % cross_compile_hosts)

cross_compile_hosts = args.cross_compile_hosts
if cross_compile_hosts:
2 changes: 1 addition & 1 deletion scripts/build/setup/termux_setup_swift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ termux_setup_swift() {
termux_download \
https://download.swift.org/development/ubuntu2204/swift-$SWIFT_RELEASE/$SWIFT_BIN.tar.gz \
$SWIFT_TAR \
2eb8105db0288443bda214b4b84d898970d1fecf08f0f5dcd5bd45bef528a4f7
c4f950ece5987328648d783ab97394ac097b4250f6c780b35653ad3faa67f83c

(cd $TERMUX_PKG_TMPDIR ; tar xf $SWIFT_TAR ; mv $SWIFT_BIN $SWIFT_FOLDER; rm $SWIFT_TAR)
fi
Expand Down

0 comments on commit 158f466

Please sign in to comment.