Skip to content

Commit c2ca497

Browse files
authored
docs/WebAssembly.md: update Swift SDK build instructions
Swift SDKs require Swift SDK Generator to be built with its dependencies. Additionally, now that tests for Wasm stdlib run by default, we should include required tools. Embedded Swift build is also enabled in the documented invocation.
1 parent 66dc1cc commit c2ca497

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

docs/WebAssembly.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@ one wouldn't want end users to download multi-megabyte binaries.
1919
## Building Swift SDK for WebAssembly
2020

2121
The [Swift SDK](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0387-cross-compilation-destinations.md)
22-
for WebAssembly is built using the following command:
22+
for WebAssembly is built and tested using the following command:
2323

2424
```bash
25-
./utils/build-script --build-wasm-stdlib
25+
./utils/build-script --build-wasm-stdlib --wasmkit --install-llvm --install-swift --swiftpm --install-swiftpm \
26+
--libcxx --install-libcxx --llbuild --install-llbuild --swift-testing --install-swift-testing \
27+
--swift-testing-macros --install-swift-testing-macros --build-embedded-stdlib --build-embedded-stdlib-cross-compiling \
28+
'--llvm-install-components=llvm-ar;llvm-nm;llvm-ranlib;llvm-cov;llvm-profdata;llvm-objdump;llvm-objcopy;llvm-symbolizer;IndexStore;clang;clang-resource-headers;builtins;runtimes;clangd;libclang;dsymutil;LTO;clang-features-file;lld'
2629
```
2730

2831
This command will build the Swift compiler for the host platform and then build the Swift standard library
29-
for WebAssembly targets. The resulting Swift SDK `.artifactbundle` will be placed in the `../swift-sdk-generator/Bundles`
32+
for WebAssembly targets. Toolchain `lit.py` tests will run on the freshly built stdlib, both for embedded and non-embedded
33+
builds. The resulting Swift SDK `.artifactbundle` will be placed in the `../swift-sdk-generator/Bundles`
3034
directory.
3135

3236
## Building Swift SDK for WebAssembly without building the compiler

0 commit comments

Comments
 (0)