Skip to content

Commit 02db743

Browse files
committed
Fix the SwiftPM build on Android
1 parent 545b35d commit 02db743

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Package.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ let embeddedSqliteCondition: TargetDependencyCondition? = {
1414
if useEmbeddedSqlite {
1515
return nil
1616
}
17-
return .when(platforms: [.windows])
17+
return .when(platforms: [.windows, .android])
1818
}()
1919

2020
let externalSqliteLibraries: [LinkerSetting] = {
2121
if useEmbeddedSqlite {
2222
return []
2323
}
24-
return [.linkedLibrary("sqlite3", .when(platforms: [.macOS, .iOS, .tvOS, .watchOS, .visionOS, .macCatalyst, .linux, .android]))]
24+
return [.linkedLibrary("sqlite3", .when(platforms: [.macOS, .iOS, .tvOS, .watchOS, .visionOS, .macCatalyst, .linux]))]
2525
}()
2626

2727
let terminfoLibraries: [LinkerSetting] = {
2828
if !useTerminfo {
2929
return []
3030
}
31-
return [.linkedLibrary("ncurses", .when(platforms: [.linux, .macOS, .android]))]
31+
return [.linkedLibrary("ncurses", .when(platforms: [.linux, .macOS]))]
3232
}()
3333

3434
let package = Package(
@@ -98,7 +98,10 @@ let package = Package(
9898
.target(
9999
name: "llbuildBasic",
100100
dependencies: ["llvmSupport"],
101-
path: "lib/Basic"
101+
path: "lib/Basic",
102+
linkerSettings: [
103+
.linkedLibrary("android-spawn", .when(platforms: [.android]))
104+
]
102105
),
103106
.target(
104107
name: "llbuildCore",

include/llvm/Config/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@
267267
#define HAVE_SYS_TYPES_H 1
268268

269269
/* Define if the setupterm() function is supported this platform. */
270-
#if (defined(__APPLE__) && TARGET_OS_IPHONE) || defined(LLBUILD_NO_TERMINFO)
270+
#if (defined(__APPLE__) && TARGET_OS_IPHONE) || defined(__ANDROID__) || defined(LLBUILD_NO_TERMINFO)
271271
#undef HAVE_TERMINFO
272272
#else
273273
#define HAVE_TERMINFO 1

0 commit comments

Comments
 (0)