Skip to content

Commit c56085a

Browse files
authored
stdlib/public/CMakeLists.txt: Enable embedded Wasm
Running `swiftc` with `wasm32-none-none` or `wasm32-unknown-none` currently fails, as this embedded target is not built. Let's include it in the list of embedded targets.
1 parent f08f86c commit c56085a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
191191
)
192192
endif()
193193

194+
if("WebAssembly" IN_LIST LLVM_TARGETS_TO_BUILD)
195+
list(APPEND EMBEDDED_STDLIB_TARGET_TRIPLES
196+
"arm64 wasm32-none-none-wasm wasm32-none-none-wasm
197+
)
198+
endif()
199+
194200
if (SWIFT_HOST_VARIANT STREQUAL "linux")
195201
set(EMBEDDED_STDLIB_TARGET_TRIPLES ${EMBEDDED_STDLIB_TARGET_TRIPLES}
196202
"${SWIFT_HOST_VARIANT_ARCH} ${SWIFT_HOST_VARIANT_ARCH}-unknown-linux-gnu ${SWIFT_HOST_VARIANT_ARCH}-unknown-linux-gnu"

0 commit comments

Comments
 (0)