@@ -16,20 +16,15 @@ $ ./build-docker <version> <workdir>
1616for example:
1717
1818```
19- $ ./build-docker release /tmp/android-sdk
19+ $ ./build-docker tag:swift-6.2-RELEASE /tmp/android-sdk
2020```
2121
2222This will create an Ubuntu 24.04 container with the necessary dependencies
2323to build the Android SDK, including a Swift host toolchain and the
2424Android NDK that will be used for cross-compilation.
2525
26- The ` version ` argument can be one of the following values:
27-
28- | version | Swift version example |
29- | --- | --- |
30- | ` release ` | swift-6.1-RELEASE |
31- | ` swift-6.2-branch ` | swift-6.2-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
32- | ` development ` | swift-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
26+ The ` version ` argument can be a branch scheme, like "scheme: release /6.2", or a
27+ tag, like "tag: swift-6 .2-DEVELOPMENT-SNAPSHOT-2025-09-04-a".
3328
3429> [ !WARNING]
3530> The workdir argument must not be located in a git repository (e.g., it cannot be the
@@ -41,7 +36,7 @@ The top-level `./build-docker` script installs a host toolchain and the
4136Android NDK, and then invokes ` scripts/fetch-source.sh ` which will
4237fetch tagged sources for libxml2, curl, boringssl, and swift.
4338
44- It then applies some patches and invokes ` scripts/build.sh ` ,
39+ It then applies some perl substitutions and invokes ` scripts/build.sh ` ,
4540which will build the sources for each of the specified
4641architectures and then combines the SDKs into a single
4742artifactbundle with targetTriples for each of the supported
@@ -50,7 +45,7 @@ and Android API levels (28-35).
5045
5146## Specifying Architectures
5247
53- By default all the supported Android architectures
48+ By default, all the supported Android architectures
5449will be built, but this can be reduced in order to speed
5550up the build. This can be useful, e.g., as part of a CI that
5651validates a pull request, as building a single architecture
@@ -60,19 +55,20 @@ whereas building for all the architectures takes over an hour.
6055To build an artifactbundle for just the ` x86_64 ` architecture, run:
6156
6257```
63- TARGET_ARCHS=x86_64 ./build-docker release /tmp/android-sdk
58+ TARGET_ARCHS=x86_64 ./build-docker scheme:main /tmp/android-sdk
6459```
6560
66- ## Installing and validating the SDK
61+ ## Building the Swift compiler from source and running the validation suite
6762
68- The ` .github/workflows/pull_request.yml ` workflow
69- will create and upload an installable SDK named something like:
70- ` swift-6.1-RELEASE_android-0.1.artifactbundle.tar.gz `
63+ All tags that are specified will download the official release or snapshot
64+ toolchain and build only the bundle by default, while building from a branch
65+ scheme always builds the full Swift compiler from the latest commit in that
66+ branch. If you want to build the Swift compiler from source for a tag also and
67+ run the compiler validation suite, specify the ` BUILD_COMPILER ` variable:
7168
72- The GitHub workflow will also install the SDK locally and use
73- [ swift-android-action] ( https://github.com/marketplace/actions/swift-android-action )
74- to build and test various Swift packages in an Android emulator using the
75- freshly-created SDK bundle.
69+ ```
70+ BUILD_COMPILER=yes ./build-docker tag:swift-DEVELOPMENT-SNAPSHOT-2025-09-04-a /tmp/android-sdk
71+ ```
7672
7773## Building locally
7874
@@ -85,5 +81,5 @@ a GitHub runner). A local build can be run with the
8581` build-local ` script, such as:
8682
8783```
88- ./build-local swift- 6.2-branch /tmp/android-sdk-devel
84+ ./build-local scheme:release/ 6.2 /tmp/android-sdk
8985```
0 commit comments