Skip to content

Commit

Permalink
swift: update from 6.0.3 to trunk 6.2 Jan 10 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin committed Jan 13, 2025
1 parent ba5141a commit 6b6fa98
Show file tree
Hide file tree
Showing 16 changed files with 138 additions and 1,786 deletions.
6 changes: 3 additions & 3 deletions packages/libdispatch/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ TERMUX_PKG_HOMEPAGE=https://github.com/swiftlang/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:6.0.2"
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-corelibs-libdispatch/archive/swift-RELEASE.tar.gz
TERMUX_PKG_SHA256=3df429b22d9294c0ca5291c86e83a35f6326600a1c271933107bba199b919008
TERMUX_PKG_VERSION="1:6.2"
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-corelibs-libdispatch/archive/swift-DEVELOPMENT-SNAPSHOT-2025-01-10-a.tar.gz
TERMUX_PKG_SHA256=0257e985723e17bf7cb943ae963a0e8bc6d15ab4929b84672131806582be6535
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_DEPENDS="libc++, libblocksruntime"
6 changes: 3 additions & 3 deletions packages/llbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ TERMUX_PKG_HOMEPAGE=https://github.com/swiftlang/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=6.0.2
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-llbuild/archive/swift-RELEASE.tar.gz
TERMUX_PKG_SHA256=40ada0511f0218fb3ca0478c8fff1b4d0958478056a0cc5408677753e8c8f7a7
TERMUX_PKG_VERSION=6.2
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-llbuild/archive/swift-DEVELOPMENT-SNAPSHOT-2025-01-10-a.tar.gz
TERMUX_PKG_SHA256=59b01224fad52a4f32dd181b0a8b990ddce96ca8c5cc14d63d70db4e78ae1ed9
TERMUX_PKG_DEPENDS="libc++, libandroid-spawn, libsqlite"
TERMUX_PKG_NO_STATICSPLIT=true
63 changes: 36 additions & 27 deletions packages/swift/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ 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=6.0.3
SWIFT_RELEASE="RELEASE"
TERMUX_PKG_VERSION=6.2
SWIFT_RELEASE="DEVELOPMENT-SNAPSHOT-2025-01-10-a"
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift/archive/swift-$SWIFT_RELEASE.tar.gz
TERMUX_PKG_SHA256=1489681860e92cee5ddd869a06531d7a1746b2f4ea105a2ff3b631ebcbcffd34
TERMUX_PKG_SHA256=1219fd794176f3e9d60c2d9beb31f58509cf378d1b9f1f2481a2edf1226a0a1f
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_DEPENDS="clang, libandroid-execinfo, libandroid-glob, libandroid-posix-semaphore, libandroid-shmem, libandroid-spawn, libandroid-spawn-static, libandroid-sysv-semaphore, libcurl, libsqlite, libuuid, libxml2, libdispatch, llbuild, pkg-config, swift-sdk-${TERMUX_ARCH/_/-}"
TERMUX_PKG_DEPENDS="clang, libandroid-execinfo, libandroid-glob, libandroid-posix-semaphore, libandroid-shmem, libandroid-spawn, libandroid-spawn-static, libandroid-sysv-semaphore, libcurl, libuuid, libxml2, libdispatch, llbuild, pkg-config, swift-sdk-${TERMUX_ARCH/_/-}"
TERMUX_PKG_BUILD_DEPENDS="rsync"
TERMUX_PKG_BLACKLISTED_ARCHES="i686"
TERMUX_PKG_NO_STATICSPLIT=true
# Temporary hack only needed for x86_64
# Temporary hack only needed for arm and x86_64
TERMUX_PKG_UNDEF_SYMBOLS_FILES="
./opt/ndk-multilib/arm-linux-androideabi/lib/libFoundation.so
./opt/ndk-multilib/arm-linux-androideabi/lib/libFoundationNetworking.so
Expand Down Expand Up @@ -42,33 +42,35 @@ termux_step_post_get_source() {
mv .temp swift

declare -A library_checksums
library_checksums[swift-cmark]=ab1064350ecedd5b3c0f2a6fbe3acefbc45d7accf1e4ca1591ce04d0c6787e40
library_checksums[llvm-project]=d93ca164615938e5026a2d1af76b2ef7514eae98b38a716f3278bc1a6dfc8f92
library_checksums[swift-experimental-string-processing]=6c34cfdf934eb781169866a66505e11541861ba638b05fd4ed87f8c34a6fa55e
library_checksums[swift-syntax]=30788e115f37b7d3f8fc1f5d436b80996f4945fc13287ed7e4391b358479fafd
library_checksums[swift-corelibs-libdispatch]=444c0de5fe18e148548a3f3b60b3bac3d4d586285c21064346c7ca17ed1d4fac
library_checksums[swift-corelibs-foundation]=62c276a18fa3b3b92e95f5349dc125d03f09cea3c477b3af1428ccdbab29e139
library_checksums[swift-foundation]=31ee3ea95a015049d3f6a5cfe8bd3a460071fa0086c1d112efaf0580611d162c
library_checksums[swift-foundation-icu]=c4332b4e6cc008a5a7045ad7f368df7deb518f286ecd5a78839066dcc07a853a
library_checksums[swift-corelibs-xctest]=eb131d1cfde18548c5fc782ba56bc871b13057b5e7b6992ddae4d4349360571d
library_checksums[swift-llbuild]=68d71bf7e0882153c6ad91fbe0626ab761d8bc46d2d93ce32cbfa392d256a30e
library_checksums[swift-argument-parser]=4a10bbef290a2167c5cc340b39f1f7ff6a8cf4e1b5433b68548bf5f1e542e908
library_checksums[Yams]=a81c6b93f5d26bae1b619b7f8babbfe7c8abacf95b85916961d488888df886fb
library_checksums[swift-collections]=cd30d2f93c72424df48d182006417abdeebe74d250cb99d1cda78daf40aca569
library_checksums[swift-crypto]=5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154
library_checksums[sourcekit-lsp]=3065554af62dbf2d1a62f82d076998372f5f43becd3f2d9795e8320f4cede0d2
library_checksums[swift-corelibs-xctest]=8f45a09fb518589d826aacca16c588468a717469bcd7e3169d2239839b2d3ac2
library_checksums[swift-corelibs-foundation]=a915255aba662363d82491db76df0d1a9e32ebdbd98d2d8ed7efdda8770a5109
library_checksums[swift-lmdb]=fdd7d49ef815a4bb6193a9910108c7692b712db9e9341433b061f09c454565c7
library_checksums[swift-collections]=7e5e48d0dc2350bed5919be5cf60c485e72a30bd1f2baf718a619317677b91db
library_checksums[swift-driver]=4ae3db8fee22a2bbfa9441f7ec063b293567c0a7d89eb2bf1261f6b4b8ae18bd
library_checksums[swift-foundation]=981752216eff72c162399078155617ac538e53adda954422f6f89ca7979ebb1e
library_checksums[swift-toolchain-sqlite]=c8704e70c4847a8dbd47aafb25d293fbe1e1bafade16cfa64e04f751e33db0ca
library_checksums[swift-argument-parser]=d5bad3a1da66d9f4ceb0a347a197b8fdd243a91ff6b2d72b78efb052b9d6dd33
library_checksums[swift-syntax]=8b963b26fc51878be95cad8fa668cd57859867ab3048778175f7c15d0e3cd114
library_checksums[swift-llbuild]=59b01224fad52a4f32dd181b0a8b990ddce96ca8c5cc14d63d70db4e78ae1ed9
library_checksums[swift-corelibs-libdispatch]=0257e985723e17bf7cb943ae963a0e8bc6d15ab4929b84672131806582be6535
library_checksums[swift-foundation-icu]=f0b4ec3c9014307700633cf955d4721cd1aec7a0a9db4550dfc8197c0bdd0796
library_checksums[swift-system]=02e13a7f77887c387f5aa1de05f4d4b8b158c35145450e1d9557d6c42b06cd1f
library_checksums[swift-asn1]=e0da995ae53e6fcf8251887f44d4030f6600e2f8f8451d9c92fcaf52b41b6c35
library_checksums[swift-tools-support-core]=bf18632a5323458264eaf0317e4c27c07c2b71d87a924a68235be2c4772d36e1
library_checksums[swift-package-manager]=8e0413d78c548462545d60dda419f5c49f582c142f8b3d4fb1f3b50b5fdda5b3
library_checksums[swift-cmark]=fc34d3fba1a9e3ef0a930661c09ee91c56440b6320769b0ef22969a7feb4c304
library_checksums[indexstore-db]=e8c90819f528e533eaeb2eac893631f461f940d2b705eded45d78a51c87b7bc2
library_checksums[swift-certificates]=fcaca458aab45ee69b0f678b72c2194b15664cc5f6f5e48d0e3f62bc5d1202ca
library_checksums[swift-driver]=9ee38eda1a0adc24dd995b345dff4a5a25d42ae8d063fcc04b170469f2f53d43
library_checksums[swift-tools-support-core]=fc83e9922d4c7df0f0d94b8840f292989eb148d5e451b182a9e390a9ea4dd94e
library_checksums[swift-package-manager]=03c5b8dfd8628de42ca1c171faeeddea977ecdad8675d3826a2c165ad8f972ba
library_checksums[indexstore-db]=fdaceb80a819e5b86d1599e7357c79e518a3ff0bb96dcd82245fc50e3d6bbc0d
library_checksums[sourcekit-lsp]=928db64bc179a250afd305b5729217180e2de1cdcd3d353d0fa20b38c5def8ec
library_checksums[swift-crypto]=5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154
library_checksums[llvm-project]=0afd7cf017633fbce49f96a61e6ae10fdcd29acf7dc35b0f2df80c21ec119fad
library_checksums[swift-experimental-string-processing]=e3d875438b1457acacd29f0679e44bb1d3bfa2188c1c2fc5798ba6d2278785d3
library_checksums[Yams]=d0f8eced7ef3462945bde1fe0e37288b7df6a50ca854df53b3aff43ce4d38e39

for library in "${!library_checksums[@]}"; do \
GH_ORG="apple"
if [ "$library" = "swift-argument-parser" ]; then
SRC_VERSION="1.2.3"
SRC_VERSION="1.4.0"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-asn1" ]; then
SRC_VERSION="1.0.0"
Expand All @@ -77,17 +79,21 @@ termux_step_post_get_source() {
SRC_VERSION="1.0.1"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-collections" ]; then
SRC_VERSION="1.1.2"
SRC_VERSION="1.1.3"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-crypto" ]; then
SRC_VERSION="3.0.0"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-system" ]; then
SRC_VERSION="1.3.0"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-toolchain-sqlite" ]; then
GH_ORG="swiftlang"
SRC_VERSION="1.0.1"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "Yams" ]; then
GH_ORG="jpsim"
SRC_VERSION="5.0.6"
SRC_VERSION="5.1.3"
TAR_NAME=$SRC_VERSION
else
GH_ORG="swiftlang"
Expand Down Expand Up @@ -136,9 +142,11 @@ termux_step_make() {
if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ]; then
termux_setup_swift
ln -sf $TERMUX_PKG_HOSTBUILD_DIR/llvm-linux-x86_64 $TERMUX_PKG_BUILDDIR/llvm-linux-x86_64
ln -sf $NDK/source.properties $TERMUX_STANDALONE_TOOLCHAIN
for header in execinfo.h glob.h iconv.h spawn.h sys/sem.h sys/shm.h; do
ln -sf $TERMUX_PREFIX/include/$header $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/include/$header
done
unset ANDROID_NDK_ROOT

SWIFT_BUILD_FLAGS="$SWIFT_BUILD_FLAGS --android
--android-ndk $TERMUX_STANDALONE_TOOLCHAIN --android-arch $SWIFT_ARCH
Expand All @@ -158,6 +166,7 @@ termux_step_make() {
--install-xctest --install-llbuild --install-swiftpm --install-swift-driver --install-sourcekit-lsp

rm $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/include/{execinfo.h,glob.h,iconv.h,spawn.h,sys/sem.h,sys/shm.h}
rm $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/swift
}

termux_step_make_install() {
Expand Down
13 changes: 0 additions & 13 deletions packages/swift/swift-arm-casts.patch
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,3 @@ index 0255b38af1b..3949e62e750 100644
}

static bool classof(const DeclAttribute *DA) {
diff --git a/swift/lib/ExternalGenericMetadataBuilder/ExternalGenericMetadataBuilder.cpp b/swift/lib/ExternalGenericMetadataBuilder/ExternalGenericMetadataBuilder.cpp
index 7617abe7ee7..a0016e575c7 100644
--- a/swift/lib/ExternalGenericMetadataBuilder/ExternalGenericMetadataBuilder.cpp
+++ b/swift/lib/ExternalGenericMetadataBuilder/ExternalGenericMetadataBuilder.cpp
@@ -1488,7 +1488,7 @@ template <typename Runtime>
llvm::Error ExternalGenericMetadataBuilderContext<Runtime>::addImageInMemory(
const void *start, uint64_t length, const std::string &path) {
LOG(LogLevel::Info, "Adding %s in memory", path.c_str());
- llvm::StringRef stringRef{reinterpret_cast<const char *>(start), length};
+ llvm::StringRef stringRef{reinterpret_cast<const char *>(start), static_cast<size_t>(length)};
llvm::MemoryBufferRef bufferRef{stringRef, {}};
auto binary = llvm::object::createBinary(bufferRef);
if (!binary)
Loading

0 comments on commit 6b6fa98

Please sign in to comment.