Skip to content

Commit

Permalink
swift: update from 6.0.2 to trunk 6.1 Nov 18 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin committed Nov 20, 2024
1 parent 5ac1eb4 commit 328af8d
Show file tree
Hide file tree
Showing 18 changed files with 195 additions and 1,546 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.1"
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-corelibs-libdispatch/archive/swift-DEVELOPMENT-SNAPSHOT-2024-11-18-a.tar.gz
TERMUX_PKG_SHA256=87e9fe2ff7c2030d8675cc9b1dc44e45b5d1a9b9cdbd17eff14fa77389de4a0c
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.1
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift-llbuild/archive/swift-DEVELOPMENT-SNAPSHOT-2024-11-18-a.tar.gz
TERMUX_PKG_SHA256=75d3e528cffa6380c70af26a4f83b78122182b371a98cb31c0b90ba34d67e5a6
TERMUX_PKG_DEPENDS="libc++, libandroid-spawn, libsqlite"
TERMUX_PKG_NO_STATICSPLIT=true
56 changes: 31 additions & 25 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.2
SWIFT_RELEASE="RELEASE"
TERMUX_PKG_VERSION=6.1
SWIFT_RELEASE="DEVELOPMENT-SNAPSHOT-2024-11-18-a"
TERMUX_PKG_SRCURL=https://github.com/swiftlang/swift/archive/swift-$SWIFT_RELEASE.tar.gz
TERMUX_PKG_SHA256=1489681860e92cee5ddd869a06531d7a1746b2f4ea105a2ff3b631ebcbcffd34
TERMUX_PKG_SHA256=2fa0b4237fdae03a26e01f97b54fea4e7e9a283ce6ed069324334dc44b583c3f
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_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,34 @@ termux_step_post_get_source() {
mv .temp swift

declare -A library_checksums
library_checksums[swift-cmark]=2bfeab8747f4bcfea6aa70ed0494fe2185ec2532f1c9b7a0e17214cd401e9f31
library_checksums[llvm-project]=991e9d63548a5ae8ce4fdda4052e98cb2bf2b193cafac8bbeea8f830f8cede96
library_checksums[swift-experimental-string-processing]=e0380895e1cf5dc49aef321256f8192986185a6fa6ea83c143f171b643450fc0
library_checksums[swift-syntax]=82cb7640775a23cf7483197f0cd6a6342a29a61d4bb75239905490bf47a64a75
library_checksums[swift-corelibs-libdispatch]=3df429b22d9294c0ca5291c86e83a35f6326600a1c271933107bba199b919008
library_checksums[swift-corelibs-foundation]=8af719f14a05cee2d32625cf455261fc74d13eeef3ba9e5b9547316743d5cde9
library_checksums[swift-foundation]=a677ad3a712fb4d8330bccd28904aaa1b10749264d57ad9370215a89156ba1d3
library_checksums[swift-foundation-icu]=a48f0d6f998ba6db710f89f0e987c4cf00f3845338afae116ab3e29c04dad127
library_checksums[swift-corelibs-xctest]=a671062f178c68dd1fb0fdcf6a7c00589b343a63009a59b522206e03c9850d97
library_checksums[swift-llbuild]=40ada0511f0218fb3ca0478c8fff1b4d0958478056a0cc5408677753e8c8f7a7
library_checksums[swift-argument-parser]=4a10bbef290a2167c5cc340b39f1f7ff6a8cf4e1b5433b68548bf5f1e542e908
library_checksums[Yams]=a81c6b93f5d26bae1b619b7f8babbfe7c8abacf95b85916961d488888df886fb
library_checksums[swift-collections]=cd30d2f93c72424df48d182006417abdeebe74d250cb99d1cda78daf40aca569
library_checksums[swift-crypto]=5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154
library_checksums[sourcekit-lsp]=395fb40eda724c88178496825f971863f7f6110c05206f790716e65831547995
library_checksums[swift-corelibs-xctest]=2bb2f0db531d9434620371d422920ef6c763932a0c60e5a4cfe8ef3cd6aa5285
library_checksums[swift-corelibs-foundation]=9d562395228149bcc3da96c13e441dfde3f6a8f196b7da526dcf6e754f65edc5
library_checksums[swift-collections]=7e5e48d0dc2350bed5919be5cf60c485e72a30bd1f2baf718a619317677b91db
library_checksums[swift-driver]=2e825fb69ea516c1d719be086dfbbf79da829c3236bd3ea801e54010ec33323d
library_checksums[swift-foundation]=edf08f70e0a69d75c11e1abd212bebc672163383d76abe779148ceedc8261ee4
library_checksums[swift-toolchain-sqlite]=c8704e70c4847a8dbd47aafb25d293fbe1e1bafade16cfa64e04f751e33db0ca
library_checksums[swift-argument-parser]=d5bad3a1da66d9f4ceb0a347a197b8fdd243a91ff6b2d72b78efb052b9d6dd33
library_checksums[swift-syntax]=acfc4aaffd2034d9e2d14ce7c243f725c0485c4f8d1dbb248dd1476a879ae220
library_checksums[swift-llbuild]=75d3e528cffa6380c70af26a4f83b78122182b371a98cb31c0b90ba34d67e5a6
library_checksums[swift-corelibs-libdispatch]=87e9fe2ff7c2030d8675cc9b1dc44e45b5d1a9b9cdbd17eff14fa77389de4a0c
library_checksums[swift-foundation-icu]=d875ff9e4ef9e97b16985d1a9a1727f1453a6a70108eca3edc6d46526712dc47
library_checksums[swift-system]=02e13a7f77887c387f5aa1de05f4d4b8b158c35145450e1d9557d6c42b06cd1f
library_checksums[swift-asn1]=e0da995ae53e6fcf8251887f44d4030f6600e2f8f8451d9c92fcaf52b41b6c35
library_checksums[swift-tools-support-core]=3ba0a77cfc085e3b137ac63757ab9d744d5d075c1a39ae6133253501456a04b9
library_checksums[swift-package-manager]=51ad256ccd83f0223492050024bf3b40c7135dfc42b2a1c97684605469a578c0
library_checksums[swift-cmark]=e642e49466a7b7f05ceef0af81419e31747b086d6eadea7b053a34ef81118e3a
library_checksums[indexstore-db]=0acb5fd2d2deba2333f09edd64b52af22780c42a58590b5d99d67adb6559dab0
library_checksums[swift-certificates]=fcaca458aab45ee69b0f678b72c2194b15664cc5f6f5e48d0e3f62bc5d1202ca
library_checksums[swift-driver]=c6db9d058c8d5122f8e368087e397d59cf17ce5be686d4713025269658f0467e
library_checksums[swift-tools-support-core]=2f88a0790e9fe6fc0efa6a1fc1382d71c010126f871a6516ba56fb05dd1d23a0
library_checksums[swift-package-manager]=00e40c3bce9b63fdd24d783909af003c7f86431898ee6b8bf44174d023d08402
library_checksums[indexstore-db]=61f6d010edc11f31b5e01efb3628958501a1883b07ee4c741bbebc8c7d43d03d
library_checksums[sourcekit-lsp]=26175c4774f9817ad32c62c004ca76e9f09d8b77a253fca0e4eafdb33f33b2d2
library_checksums[swift-crypto]=5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154
library_checksums[llvm-project]=20d8e7f79bed933da0b45c6abfb95867a275a41804b1bd7071b01aee90491ede
library_checksums[swift-experimental-string-processing]=99d9b3b80d4f94a83e7183d5b7dc5360d0c8995aae8a2b7e451579e6e765407f
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 @@ -158,6 +163,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 328af8d

Please sign in to comment.