mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.
9 lines
304 B
Swift
9 lines
304 B
Swift
// 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
|