Skip to content

Commit 3b849e0

Browse files
authored
Merge pull request #59173 from compnerd/android
cmake: add android runtime build caches
2 parents c2b7d82 + b739394 commit 3b849e0

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
set(SWIFT_HOST_VARIANT_SDK ANDROID CACHE STRING "")
3+
set(SWIFT_HOST_VARIANT_ARCH aarch64 CACHE STRING "")
4+
5+
# NOTE(compnerd) disable the tools, we are trying to build just the standard
6+
# library.
7+
set(SWIFT_INCLUDE_TOOLS NO CACHE BOOL "")
8+
9+
# NOTE(compnerd) cannot build tests since the tests require the toolchain
10+
set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
11+
12+
# NOTE(compnerd) cannot build docs since that requires perl
13+
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")
14+
15+
# NOTE(compnerd) these are part of the toolchain, not the runtime.
16+
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
17+
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")
18+
19+
# NOTE(compnerd) build with the compiler specified, not a just built compiler.
20+
set(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER YES CACHE BOOL "")
21+
22+
set(SWIFT_SDK_ANDROID_ARCHITECTURES aarch64 CACHE STRING "")
23+
24+
# NOTE(compnerd) this is lollipop, which seems to still have decent usage.
25+
set(SWIFT_ANDROID_API_LEVEL 21 CACHE STRING "")
26+
# NOTE(compnerd) this matches the value from the NDK r24.
27+
set(SWIFT_ANDROID_NDK_CLANG_VERSION 14.0.1 CACHE STRING "" FORCE)
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
set(SWIFT_HOST_VARIANT_SDK ANDROID CACHE STRING "")
3+
set(SWIFT_HOST_VARIANT_ARCH armv7 CACHE STRING "")
4+
5+
# NOTE(compnerd) disable the tools, we are trying to build just the standard
6+
# library.
7+
set(SWIFT_INCLUDE_TOOLS NO CACHE BOOL "")
8+
9+
# NOTE(compnerd) cannot build tests since the tests require the toolchain
10+
set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
11+
12+
# NOTE(compnerd) cannot build docs since that requires perl
13+
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")
14+
15+
# NOTE(compnerd) these are part of the toolchain, not the runtime.
16+
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
17+
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")
18+
19+
# NOTE(compnerd) build with the compiler specified, not a just built compiler.
20+
set(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER YES CACHE BOOL "")
21+
22+
set(SWIFT_SDK_ANDROID_ARCHITECTURES armv7 CACHE STRING "")
23+
24+
# NOTE(compnerd) this is lollipop, which seems to still have decent usage.
25+
set(SWIFT_ANDROID_API_LEVEL 21 CACHE STRING "")
26+
# NOTE(compnerd) this matches the value from the NDK r24.
27+
set(SWIFT_ANDROID_NDK_CLANG_VERSION 14.0.1 CACHE STRING "" FORCE)
28+

0 commit comments

Comments
 (0)