Skip to content

Commit

Permalink
swift: update from 5.10 to 6.0 Apr 5 snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin committed Apr 7, 2024
1 parent 2666894 commit 37596e2
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 6,808 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: Setup arm and aarch64 CPU emulators
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,8 +2,8 @@ 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.10"
TERMUX_PKG_SRCURL=https://github.com/apple/swift-corelibs-libdispatch/archive/swift-${TERMUX_PKG_VERSION:2}-RELEASE.tar.gz
TERMUX_PKG_SHA256=16e088cf12654d22658879710b9694a6fad1c94d5e5d0c597741b71fbcb3e034
TERMUX_PKG_VERSION="1:6.0"
TERMUX_PKG_SRCURL=https://github.com/apple/swift-corelibs-libdispatch/archive/swift-${TERMUX_PKG_VERSION:2}-DEVELOPMENT-SNAPSHOT-2024-04-05-a.tar.gz
TERMUX_PKG_SHA256=828bad19ffbcbb284d11d1f1c7bc63b190c2ab347dcff963da3e71000699ab33
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/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.10
TERMUX_PKG_SRCURL=https://github.com/apple/swift-llbuild/archive/swift-${TERMUX_PKG_VERSION}-RELEASE.tar.gz
TERMUX_PKG_SHA256=ae8962d59244abac157c02813d05e1c077915bbd6022fe9fb62040806ac8dc55
TERMUX_PKG_VERSION=6.0
TERMUX_PKG_SRCURL=https://github.com/apple/swift-llbuild/archive/swift-${TERMUX_PKG_VERSION}-DEVELOPMENT-SNAPSHOT-2024-04-05-a.tar.gz
TERMUX_PKG_SHA256=edcf1becd377f41de14f07ee7e96b6a9fe10729489c99e98ac519182ee07b058
TERMUX_PKG_DEPENDS="libc++, libandroid-spawn, libsqlite"
TERMUX_PKG_NO_STATICSPLIT=true
44 changes: 21 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.10
TERMUX_PKG_REVISION=1
SWIFT_RELEASE="RELEASE"
TERMUX_PKG_VERSION=6.0
SWIFT_RELEASE="DEVELOPMENT-SNAPSHOT-2024-04-05-a"
TERMUX_PKG_SRCURL=https://github.com/apple/swift/archive/swift-$TERMUX_PKG_VERSION-$SWIFT_RELEASE.tar.gz
TERMUX_PKG_SHA256=874c3b6668fb138db35c9f1c63570dafacac8476a6094b17764a51a45a1b69a2
TERMUX_PKG_SHA256=8f3f7dc8933429f948b03f8db56aa04785c3ec60d96602bcc51888120e9ae386
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_DEPENDS="clang, libandroid-glob, libandroid-posix-semaphore, libandroid-spawn, libcurl, libicu, libicu-static, libsqlite, libuuid, libxml2, libdispatch, llbuild, pkg-config, swift-sdk-${TERMUX_ARCH/_/-}"
Expand Down Expand Up @@ -36,27 +35,26 @@ termux_step_post_get_source() {
mv .temp swift

declare -A library_checksums
library_checksums[swift-cmark]=6b7377e78b59410f8f3993cd6b83fe35fd097369a5cf89aa77c0e8b86d2218ee
library_checksums[llvm-project]=107e88150257e0c12333b4c43baa371a4252118e4977a69f5a16c566ee9f2cd3
library_checksums[swift-experimental-string-processing]=542fa52af41287772ff36a18f4a8971e0aec07dbf4c59400e6d3422ab42d46df
library_checksums[swift-syntax]=bec161cf707758d34d208c8e00bc338603094b489a9388caff79db1af3af20c7
library_checksums[swift-corelibs-libdispatch]=16e088cf12654d22658879710b9694a6fad1c94d5e5d0c597741b71fbcb3e034
library_checksums[swift-corelibs-foundation]=e25700bffc439b36c5c9acf169332c0dd9805fcd91cd570b4ce96163b70bae5b
library_checksums[swift-corelibs-xctest]=b298316185270ac43ecdaf4c2fbd4329af51a18b174650510d7526238e9ca6fa
library_checksums[swift-llbuild]=ae8962d59244abac157c02813d05e1c077915bbd6022fe9fb62040806ac8dc55
library_checksums[swift-argument-parser]=4a10bbef290a2167c5cc340b39f1f7ff6a8cf4e1b5433b68548bf5f1e542e908
library_checksums[Yams]=ec1ad699c30f0db45520006c63a88cc1c946a7d7b36dff32a96460388c0a4af2
library_checksums[sourcekit-lsp]=85b0afc3a5e60d43a6ed2c074fa3b18ad94ca154d6f25a4024e3badebf6b1af0
library_checksums[swift-corelibs-xctest]=178553440c4ae5e9ad7d506d7ba1d61c80b3f4781b0013620fa54d3b51824200
library_checksums[swift-corelibs-foundation]=91ac54b1c51e7594f7fdc935a2375e3a594f331f3e68a25135b364a762d1c9f9
library_checksums[swift-collections]=d0f584b197860db26fd939175c9d1a7badfe7b89949b4bd52d4f626089776e0a
library_checksums[swift-crypto]=5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154
library_checksums[swift-system]=865b8c380455eef27e73109835142920c60ae4c4f4178a3d12ad04acc83f1371
library_checksums[swift-driver]=4e90b1f1e10baa8bf8dc8e57be635e051d9154d7702ff8ba5586dc80b712f6b3
library_checksums[swift-argument-parser]=4a10bbef290a2167c5cc340b39f1f7ff6a8cf4e1b5433b68548bf5f1e542e908
library_checksums[swift-syntax]=cff320a59febd06bb76e451ddd3cc5876f27f836daa2ed7f43da5c95008d37f3
library_checksums[swift-llbuild]=edcf1becd377f41de14f07ee7e96b6a9fe10729489c99e98ac519182ee07b058
library_checksums[swift-corelibs-libdispatch]=828bad19ffbcbb284d11d1f1c7bc63b190c2ab347dcff963da3e71000699ab33
library_checksums[swift-system]=ab771be8a944893f95eed901be0a81a72ef97add6caa3d0981e61b9b903a987d
library_checksums[swift-asn1]=e0da995ae53e6fcf8251887f44d4030f6600e2f8f8451d9c92fcaf52b41b6c35
library_checksums[swift-tools-support-core]=3adb1ef2ff2e8d1afef67128c57ddd9187f59ff2282960c6a075b32c36318215
library_checksums[swift-package-manager]=edd20fa7f9022e8c91c940c10f80837bb7d8d5bef03cdc9bc84f42f29fc6107e
library_checksums[swift-cmark]=844d12265551bebbe4dbac735f536bed12c7acc58a019dea8ef24734864fcb38
library_checksums[indexstore-db]=b5a6d46dc679bdb58f82c96582f88833314fb3e22aad864fc711b39478183b21
library_checksums[swift-certificates]=fcaca458aab45ee69b0f678b72c2194b15664cc5f6f5e48d0e3f62bc5d1202ca
library_checksums[swift-driver]=51a48f1f277f4c5f87b8e1f08668e99ecd74f9fbee359ccde502cbb839eb7128
library_checksums[swift-tools-support-core]=36bb714e46966bdc48e9835e9440508f30f6c9d0b4479a1cebae0ab9f5952bb9
library_checksums[swift-package-manager]=857391656ef94e7ef249b5d05d6a4226c2ec070ddbdd182d7dac92de748ff526
library_checksums[indexstore-db]=b701755b9ecef2363b8f91ad3d1f8677d78f06e81857a10de9a835c72176c241
library_checksums[sourcekit-lsp]=e69f11068546ba1ee0015c68d3dbde0d053f1574ca643dd8d43e1d9dbc4cb2d7

library_checksums[swift-crypto]=5c860c0306d0393ff06268f361aaf958656e1288353a0e23c3ad20de04319154
library_checksums[llvm-project]=6b08bfb13b29e3c6c61f792764dbb3f05f40b02775bf7714c176be35b243244d
library_checksums[swift-experimental-string-processing]=318d98abf40db7c94ff6c4be7e932712a7019b2e77c352d605e9af54b1b800dd
library_checksums[Yams]=ec1ad699c30f0db45520006c63a88cc1c946a7d7b36dff32a96460388c0a4af2

for library in "${!library_checksums[@]}"; do \
GH_ORG="apple"
Expand All @@ -76,7 +74,7 @@ termux_step_post_get_source() {
SRC_VERSION="3.0.0"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "swift-system" ]; then
SRC_VERSION="1.1.1"
SRC_VERSION="1.2.1"
TAR_NAME=$SRC_VERSION
elif [ "$library" = "Yams" ]; then
GH_ORG="jpsim"
Expand Down
30 changes: 0 additions & 30 deletions packages/swift/swift-android-ndk26.patch
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
diff --git a/swift/stdlib/cmake/modules/AddSwiftStdlib.cmake b/swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
index 61447d50f08..b533b9291af 100644
--- a/swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
+++ b/swift/stdlib/cmake/modules/AddSwiftStdlib.cmake
@@ -522,7 +522,11 @@ function(_add_target_variant_link_flags)
# We need to add the math library, which is linked implicitly by libc++
list(APPEND result "-lm")
if(NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
- file(GLOB RESOURCE_DIR ${SWIFT_SDK_ANDROID_ARCH_${LFLAGS_ARCH}_PATH}/../lib64/clang/*)
+ if("${SWIFT_ANDROID_NDK_PATH}" MATCHES "r26")
+ file(GLOB RESOURCE_DIR ${SWIFT_SDK_ANDROID_ARCH_${LFLAGS_ARCH}_PATH}/../lib/clang/*)
+ else()
+ file(GLOB RESOURCE_DIR ${SWIFT_SDK_ANDROID_ARCH_${LFLAGS_ARCH}_PATH}/../lib64/clang/*)
+ endif()
list(APPEND result "-resource-dir=${RESOURCE_DIR}")
endif()

diff --git a/swift/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift b/swift/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
index f8daa50325c..66be85a77f0 100644
--- a/swift/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
+++ b/swift/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
@@ -131,6 +131,8 @@ public func _stdlib_pipe() -> (readEnd: CInt, writeEnd: CInt, error: CInt) {
return _pipe(unsafeFds.baseAddress, 0, 0)
#elseif os(WASI)
preconditionFailure("No pipes available on WebAssembly/WASI")
+#elseif os(Android)
+ return pipe(unsafeFds.baseAddress!)
#else
return pipe(unsafeFds.baseAddress)
#endif
diff --git a/swift/stdlib/public/SwiftShims/swift/shims/LibcShims.h b/swift/stdlib/public/SwiftShims/swift/shims/LibcShims.h
index 1e4132f6279..045b8a28746 100644
--- a/swift/stdlib/public/SwiftShims/swift/shims/LibcShims.h
Expand Down
136 changes: 3 additions & 133 deletions packages/swift/swift-cmake.patch
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,14 @@ index b7503ecdd6..c643c2c9a5 100644
--- a/swift/CMakeLists.txt
+++ b/swift/CMakeLists.txt
@@ -463,7 +463,7 @@ set(SWIFT_BUILD_HOST_DISPATCH FALSE)
if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
# Only build libdispatch for the host if the host tools are being built and
# specifically if these two libraries that depend on it are built.
- if(SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_SOURCEKIT)
+ if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL Android AND SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_SOURCEKIT)
set(SWIFT_BUILD_HOST_DISPATCH TRUE)
endif()

@@ -857,7 +857,7 @@ endif()

if(SWIFT_BUILD_SWIFT_SYNTAX)
# Only "HOSTTOOLS" is supported in Linux when Swift parser integration is enabled.
- if(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD|FREEBSD" AND NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
+ if(SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|OPENBSD|FREEBSD" AND NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
message(WARNING "Force setting BOOTSTRAPPING=HOSTTOOLS because Swift parser integration is enabled")
set(BOOTSTRAPPING_MODE "HOSTTOOLS")
endif()
@@ -1187,6 +1187,7 @@ if(SWIFT_INCLUDE_TOOLS)
message(STATUS " Assertions: ${LLVM_ENABLE_ASSERTIONS}")
message(STATUS " LTO: ${SWIFT_TOOLS_ENABLE_LTO}")
message(STATUS " Bootstrapping: ${BOOTSTRAPPING_MODE}")
+ message(STATUS " C++ Bridging: ${BRIDGING_MODE}")
message(STATUS " Swift parser: ${SWIFT_BUILD_SWIFT_SYNTAX}")
message(STATUS "")
else()
@@ -1279,7 +1280,8 @@ if (LLVM_ENABLE_DOXYGEN)
message(STATUS "Doxygen: enabled")
endif()
Expand All @@ -84,80 +67,6 @@ index b7503ecdd6..c643c2c9a5 100644
include(Libdispatch)
endif()

@@ -1345,6 +1345,9 @@ if(SWIFT_INCLUDE_TOOLS)
FetchContent_MakeAvailable(SwiftSyntax)
endfunction()
include_swift_syntax()
+ if (NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
+ add_dependencies(SwiftSyntax swift-stdlib-android-${SWIFT_HOST_VARIANT_ARCH})
+ endif()

add_subdirectory(lib)

diff --git a/swift/SwiftCompilerSources/CMakeLists.txt b/swift/SwiftCompilerSources/CMakeLists.txt
index f4a2eb2dddc..61a2548cf77 100644
--- a/swift/SwiftCompilerSources/CMakeLists.txt
+++ b/swift/SwiftCompilerSources/CMakeLists.txt
@@ -102,7 +102,7 @@ function(add_swift_compiler_modules_library name)
elseif(${BOOTSTRAPPING_MODE} STREQUAL "CROSSCOMPILE")
set(sdk_option "-sdk" "${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH}")
get_filename_component(swift_exec_bin_dir ${ALS_SWIFT_EXEC} DIRECTORY)
- set(sdk_option ${sdk_option} "-resource-dir" "${swift_exec_bin_dir}/../lib/swift")
+ set(sdk_option ${sdk_option} "-resource-dir" "${SWIFT_BINARY_DIR}/lib/swift")
endif()
get_versioned_target_triple(target ${SWIFT_HOST_VARIANT_SDK}
${SWIFT_HOST_VARIANT_ARCH} "${deployment_version}")
@@ -186,6 +186,9 @@ function(add_swift_compiler_modules_library name)

set("${module}_dep_target" ${dep_target})
set(all_module_targets ${all_module_targets} ${dep_target})
+ if(${BOOTSTRAPPING_MODE} STREQUAL "CROSSCOMPILE")
+ add_dependencies(${dep_target} swift-stdlib-android-${SWIFT_HOST_VARIANT_ARCH})
+ endif()
endforeach()

# Create a static library containing all module object files.
diff --git a/swift/cmake/modules/AddPureSwift.cmake b/swift/cmake/modules/AddPureSwift.cmake
index dc58b8fa0f6..37e9f817471 100644
--- a/swift/cmake/modules/AddPureSwift.cmake
+++ b/swift/cmake/modules/AddPureSwift.cmake
@@ -44,6 +44,13 @@ function(_add_host_swift_compile_options name)
$<$<COMPILE_LANGUAGE:Swift>:none>)

target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:Swift>:-target;${SWIFT_HOST_TRIPLE}>)
+ if (NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
+ swift_android_tools_path(${SWIFT_HOST_VARIANT_ARCH} tools_path)
+ target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:Swift>:-resource-dir;${SWIFTLIB_DIR};>
+ $<$<COMPILE_LANGUAGE:Swift>:-sdk;${SWIFT_SDK_ANDROID_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH};>
+ $<$<COMPILE_LANGUAGE:Swift>:-tools-directory;${tools_path};>)
+ add_dependencies(${name} swift-stdlib-android-${SWIFT_HOST_VARIANT_ARCH})
+ endif()
_add_host_variant_swift_sanitizer_flags(${name})
endfunction()

diff --git a/swift/cmake/modules/AddSwift.cmake b/swift/cmake/modules/AddSwift.cmake
index a448bcb23c4..0ddbac17a52 100644
--- a/swift/cmake/modules/AddSwift.cmake
+++ b/swift/cmake/modules/AddSwift.cmake
@@ -548,7 +548,7 @@
get_filename_component(swift_bin_dir ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY)
get_filename_component(swift_dir ${swift_bin_dir} DIRECTORY)
endif()
- set(host_lib_dir "${swift_dir}/lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
+ set(host_lib_dir "${SWIFT_BINARY_DIR}/lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
set(host_lib_arch_dir "${host_lib_dir}/${SWIFT_HOST_VARIANT_ARCH}")

set(swiftrt "${host_lib_arch_dir}/swiftrt${CMAKE_C_OUTPUT_EXTENSION}")
@@ -606,6 +606,9 @@ function(_add_swift_runtime_link_flags target relpath_to_lib_dir bootstrapping)
endif()
endif()
endif()
+ if(SWIFT_HOST_VARIANT_SDK STREQUAL "ANDROID")
+ target_link_options(${target} PRIVATE "SHELL:-Xlinker -z -Xlinker nostart-stop-gc")
+ endif()
endif()

set_property(TARGET ${target} PROPERTY BUILD_WITH_INSTALL_RPATH YES)
diff --git a/swift/localization/CMakeLists.txt b/swift/localization/CMakeLists.txt
index 07a3585a66c..461a98b6856 100644
--- a/swift/localization/CMakeLists.txt
Expand All @@ -172,19 +81,6 @@ index 07a3585a66c..461a98b6856 100644
PATTERN "*.strings"
)
+endif()
diff --git a/swift/stdlib/cmake/modules/SwiftSource.cmake b/swift/stdlib/cmake/modules/SwiftSource.cmake
index 4bc312f7f89..d71f6408d9f 100644
--- a/swift/stdlib/cmake/modules/SwiftSource.cmake
+++ b/swift/stdlib/cmake/modules/SwiftSource.cmake
@@ -708,7 +708,7 @@ function(_compile_swift_files
endif()

set(swift_compiler_tool_dep)
- if(SWIFT_INCLUDE_TOOLS)
+ if(SWIFT_INCLUDE_TOOLS AND NOT ${BOOTSTRAPPING_MODE} STREQUAL "CROSSCOMPILE")
# Depend on the binary itself, in addition to the symlink.
set(swift_compiler_tool_dep "swift-frontend${target_suffix}")
endif()
diff --git a/swift/stdlib/public/Concurrency/CMakeLists.txt b/swift/stdlib/public/Concurrency/CMakeLists.txt
index 3313f56c8a6..59804ff6228 100644
--- a/swift/stdlib/public/Concurrency/CMakeLists.txt
Expand All @@ -199,7 +95,7 @@ index 3313f56c8a6..59804ff6228 100644
+ # dispatch)
endif()
elseif("${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR}" STREQUAL "singlethreaded" OR
"${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR}" STREQUAL "hooked")
"${SWIFT_CONCURRENCY_GLOBAL_EXECUTOR}" STREQUAL "hooked" OR
@@ -120,6 +120,7 @@ add_swift_target_library(swift_Concurrency ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} I
INCORPORATE_OBJECT_LIBRARIES_SHARED_ONLY
${swift_concurrency_incorporate_object_libraries_so}
Expand Down Expand Up @@ -234,16 +130,7 @@ index 7a77e125f95..7eddfea2054 100644
+ ${SWIFT_ANDROID_NATIVE_SYSROOT}/usr/include)
endfunction()

function(add_sourcekitd_swifrt_linking target path HAS_SWIFT_MODULES)
@@ -115,7 +115,7 @@ function(add_sourcekitd_swifrt_linking target path HAS_SWIFT_MODULES)
# installed host toolchain.
get_filename_component(swift_bin_dir ${SWIFT_EXEC_FOR_SWIFT_MODULES} DIRECTORY)
get_filename_component(swift_dir ${swift_bin_dir} DIRECTORY)
- set(host_lib_dir "${swift_dir}/lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
+ set(host_lib_dir "${SWIFT_BINARY_DIR}/lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")

target_link_libraries(${target} PRIVATE ${swiftrt})
target_link_libraries(${target} PRIVATE "swiftCore")
function(add_sourcekit_swift_runtime_link_flags target path HAS_SWIFT_MODULES)
diff --git a/swift/tools/swift-compatibility-symbols/CMakeLists.txt b/swift/tools/swift-compatibility-symbols/CMakeLists.txt
index 11cda641cc2..bd2cb152725 100644
--- a/swift/tools/swift-compatibility-symbols/CMakeLists.txt
Expand Down Expand Up @@ -310,20 +197,3 @@ index 531e7c0..589930f 100644
endif()
endif()
set_target_properties(XCTest PROPERTIES
diff --git a/swift-syntax/cmake/modules/AddSwiftHostLibrary.cmake b/swift-syntax/cmake/modules/AddSwiftHostLibrary.cmake
index 951c2d2e..1157ec66 100644
--- a/swift-syntax/cmake/modules/AddSwiftHostLibrary.cmake
+++ b/swift-syntax/cmake/modules/AddSwiftHostLibrary.cmake
@@ -87,6 +87,12 @@ function(add_swift_syntax_library name)
target_compile_options(${name} PRIVATE
$<$<COMPILE_LANGUAGE:Swift>:-wmo>)
endif()
+ if (NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "")
+ swift_android_tools_path(${SWIFT_HOST_VARIANT_ARCH} tools_path)
+ target_compile_options(${name} PRIVATE $<$<COMPILE_LANGUAGE:Swift>:-resource-dir;${SWIFTLIB_DIR};>
+ $<$<COMPILE_LANGUAGE:Swift>:-sdk;${SWIFT_SDK_ANDROID_ARCH_${SWIFT_HOST_VARIANT_ARCH}_PATH};>
+ $<$<COMPILE_LANGUAGE:Swift>:-tools-directory;${tools_path};>)
+ endif()

if(LLVM_USE_LINKER)
target_link_options(${name} PRIVATE
27 changes: 0 additions & 27 deletions packages/swift/swift-driver-Package.swift.patch

This file was deleted.

13 changes: 0 additions & 13 deletions packages/swift/swift-lib-Demangling-Errors.cpp.patch

This file was deleted.

Loading

0 comments on commit 37596e2

Please sign in to comment.