Skip to content

Commit

Permalink
swift: update from 6.0.3 to devel 6.1 Jan 16 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin committed Jan 17, 2025
1 parent f0d92ee commit db65f65
Show file tree
Hide file tree
Showing 16 changed files with 156 additions and 1,744 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-${TERMUX_PKG_VERSION:2}-RELEASE.tar.gz
TERMUX_PKG_SHA256=3df429b22d9294c0ca5291c86e83a35f6326600a1c271933107bba199b919008
TERMUX_PKG_VERSION="1:6.1"
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-corelibs-libdispatch/archive/swift-${TERMUX_PKG_VERSION:2}-DEVELOPMENT-SNAPSHOT-2025-01-16-a.tar.gz
TERMUX_PKG_SHA256=f852fa3987894295d572a28edc6be2f327b7008ffe5207b45f69e3d8e290f86b
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-${TERMUX_PKG_VERSION}-RELEASE.tar.gz
TERMUX_PKG_SHA256=40ada0511f0218fb3ca0478c8fff1b4d0958478056a0cc5408677753e8c8f7a7
TERMUX_PKG_VERSION=6.1
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-llbuild/archive/swift-${TERMUX_PKG_VERSION}-DEVELOPMENT-SNAPSHOT-2025-01-16-a.tar.gz
TERMUX_PKG_SHA256=1a90e8bccddd29a2fb903762dcaff2057466a55522bd92e074441130afd23a18
TERMUX_PKG_DEPENDS="libc++, libandroid-spawn, libsqlite"
TERMUX_PKG_NO_STATICSPLIT=true
57 changes: 32 additions & 25 deletions packages/swift/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ 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.1
SWIFT_RELEASE="DEVELOPMENT-SNAPSHOT-2025-01-16-a"
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift/archive/swift-$TERMUX_PKG_VERSION-$SWIFT_RELEASE.tar.gz
TERMUX_PKG_SHA256=eef9f312d00540cfabc35cb1da9221dd15d3aaca546497a14f29a641ee6484e3
TERMUX_PKG_SHA256=a642010498346ed5117ed0fb6ece99d9957f8c6036aef07c68c3b78be044e4cc
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
Expand Down Expand Up @@ -42,33 +42,34 @@ 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]=fb847868f0b1dc15e0ff18cc20b809780ccaa6f00d52b4132a76492069224456
library_checksums[swift-corelibs-xctest]=1c312aafd93177f10f534c9ef4984380cb9981f074b63d01308a12c6c6f8a7c1
library_checksums[swift-corelibs-foundation]=7d34549cf582c78c6a00eb35b7219a48c876f86a22bf21ccccfd4290c3e5ee21
library_checksums[swift-collections]=7e5e48d0dc2350bed5919be5cf60c485e72a30bd1f2baf718a619317677b91db
library_checksums[swift-driver]=65be69f5f57d70447b51b3cc9c8fe971e30c1795fa41f60d6c68a43e242b7cb1
library_checksums[swift-foundation]=1e3949559521b3606c434d6b68424108dc25b3d6e8f8974e36b03dedb8959eeb
library_checksums[swift-toolchain-sqlite]=c8704e70c4847a8dbd47aafb25d293fbe1e1bafade16cfa64e04f751e33db0ca
library_checksums[swift-argument-parser]=d5bad3a1da66d9f4ceb0a347a197b8fdd243a91ff6b2d72b78efb052b9d6dd33
library_checksums[swift-syntax]=7b2af1aabc3dad03752af82517c7cbe4f886db3cfef15e817951f4938537c0fe
library_checksums[swift-llbuild]=1a90e8bccddd29a2fb903762dcaff2057466a55522bd92e074441130afd23a18
library_checksums[swift-corelibs-libdispatch]=f852fa3987894295d572a28edc6be2f327b7008ffe5207b45f69e3d8e290f86b
library_checksums[swift-foundation-icu]=683692326ffcd8930ee73c8d0db8f4a112dde51fbf686b87e0720f7d2c9fe15e
library_checksums[swift-system]=02e13a7f77887c387f5aa1de05f4d4b8b158c35145450e1d9557d6c42b06cd1f
library_checksums[swift-asn1]=e0da995ae53e6fcf8251887f44d4030f6600e2f8f8451d9c92fcaf52b41b6c35
library_checksums[swift-tools-support-core]=1fc071af0dc1dc42d5860cbd8022c6b5c8179b2bf4a76168e5caabdc57d68a85
library_checksums[swift-package-manager]=6b9b835e8955fc04347800d96176c65689e5a479f2f983ca1939781481b7439c
library_checksums[swift-cmark]=70d3296302e2f20446bed8f6ad683c95f9244858372c87c8ffd8fbd4c4608f53
library_checksums[indexstore-db]=1e77455625840dc9ebee5ccc4faa3c873894ba011c4b8a14c0b4b798ace8a7d9
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]=5f447eafa089b7cecff952961205ac86d9747872350a042e1e9d39b8384ff7fb
library_checksums[swift-experimental-string-processing]=24d68d4bfa0a655e250671943e0f017445e91ab72ba9c0974b4c9488744248de
library_checksums[Yams]=a81c6b93f5d26bae1b619b7f8babbfe7c8abacf95b85916961d488888df886fb

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,14 +78,18 @@ 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"
Expand Down Expand Up @@ -139,6 +144,7 @@ termux_step_make() {
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 +164,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 db65f65

Please sign in to comment.