forked from finagolfin/swift-android-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swift-android-ci-except-release.patch
71 lines (67 loc) · 3.09 KB
/
swift-android-ci-except-release.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff --git a/llbuild/unittests/CMakeLists.txt b/llbuild/unittests/CMakeLists.txt
index 92a1ee38..52273afb 100644
--- a/llbuild/unittests/CMakeLists.txt
+++ b/llbuild/unittests/CMakeLists.txt
@@ -6,4 +6,4 @@ function(add_llbuild_unittest test_dirname)
add_subdirectory(CAPI)
add_subdirectory(Core)
add_subdirectory(BuildSystem)
-add_subdirectory(Ninja)
+#add_subdirectory(Ninja)
diff --git a/sourcekit-lsp/Sources/LanguageServerProtocolJSONRPC/JSONRPCConnection.swift b/sourcekit-lsp/Sources/LanguageServerProtocolJSONRPC/JSONRPCConnection.swift
index 0be22ce8..33ca7ee5 100644
--- a/sourcekit-lsp/Sources/LanguageServerProtocolJSONRPC/JSONRPCConnection.swift
+++ b/sourcekit-lsp/Sources/LanguageServerProtocolJSONRPC/JSONRPCConnection.swift
@@ -16,6 +16,9 @@ public import Foundation
public import LanguageServerProtocol
import SKLogging
import SwiftExtensions
+#if canImport(Android)
+import Android
+#endif
#else
import Dispatch
import Foundation
diff --git a/swiftpm/Package.swift b/swiftpm/Package.swift
index 48cd98431..6eaacae00 100644
--- a/swiftpm/Package.swift
+++ b/swiftpm/Package.swift
@@ -76,7 +76,7 @@ let swiftPMProduct = (
let systemSQLitePkgConfig: String? = nil
#else
let includeDynamicLibrary: Bool = true
-let systemSQLitePkgConfig: String? = "sqlite3"
+let systemSQLitePkgConfig: String? = nil
#endif
/** An array of products which have two versions listed: one dynamically linked, the other with the
@@ -199,7 +203,7 @@ let package = Package(
dependencies: [
"_AsyncFileSystem",
.target(name: "SPMSQLite3", condition: .when(platforms: [.macOS, .iOS, .tvOS, .watchOS, .visionOS, .macCatalyst, .linux])),
- .product(name: "SwiftToolchainCSQLite", package: "swift-toolchain-sqlite", condition: .when(platforms: [.windows])),
+ .product(name: "SwiftToolchainCSQLite", package: "swift-toolchain-sqlite", condition: .when(platforms: [.windows, .android])),
.product(name: "DequeModule", package: "swift-collections"),
.product(name: "OrderedCollections", package: "swift-collections"),
.product(name: "SwiftToolsSupport-auto", package: "swift-tools-support-core"),
diff --git a/swiftpm/Sources/Basics/SQLite.swift b/swiftpm/Sources/Basics/SQLite.swift
index 2ad235030..803490b48 100644
--- a/swiftpm/Sources/Basics/SQLite.swift
+++ b/swiftpm/Sources/Basics/SQLite.swift
@@ -12,7 +12,7 @@
import Foundation
-#if SWIFT_PACKAGE && os(Windows)
+#if SWIFT_PACKAGE && (os(Windows) || os(Android))
#if USE_IMPL_ONLY_IMPORTS
@_implementationOnly import SwiftToolchainCSQLite
#else
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):
# Don't use GNU strerror_r on Android.
if '-android' in args.build_target:
build_flags.extend(["-Xswiftc", "-Xcc", "-Xswiftc", "-U_GNU_SOURCE"])
+ build_flags.extend(["-Xlinker", "-landroid-spawn"])
cross_compile_hosts = args.cross_compile_hosts
if cross_compile_hosts: