-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm: add support for
wasm32-unknown-wasi
This adds the initial conditional compilation support for the WASM32 "architecture" assuming that WASI is used as the "OS". Support for baremetal targets in Swift needs more work still, but this gives enough infrastructure to start playing with WASM.
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: %swift -typecheck %s -verify -target wasm32-unknown-wasi -disable-objc-interop -parse-stdlib | ||
// RUN: %swift-ide-test -test-input-complete -source-filename %s -target wasm32-unknown-wasi | ||
|
||
#if arch(wasm32) && os(WASI) && _runtime(_Native) && _endian(little) | ||
class C {} | ||
var x = C() | ||
#endif | ||
var y = x |