-
Notifications
You must be signed in to change notification settings - Fork 10.5k
test: enable WebAssembly/WASI in lit.cfg #31695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cb75976
to
1c7e107
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty fragile currently, and definitely will break on some hosts.
1c7e107
to
299202b
Compare
299202b
to
4ecd01b
Compare
test/lit.cfg
Outdated
(config.swiftc, config.variant_triple)) | ||
config.target_clang = ( | ||
"%s -target %s %s -fobjc-runtime=ios-5.0" % | ||
(config.clangxx, config.variant_triple, clang_mcp_opt)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why clang++
here rather than clang
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was copied from the Android code above, where they use clang++
. Would you like me to clean that up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes please; this would force linking against a C++ runtime, which can go wrong if not done with care, especially with ongoing work to support C++ interop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out, I've updated the PR to use clang
instead of clang++
. Would you mind triggering another CI run?
@swift-ci please test |
Build failed |
I don't think that the macOS failure is related to this PR in any way:
|
4ecd01b
to
d715184
Compare
I've removed the now-unused change in |
d715184
to
7d187d3
Compare
@swift-ci please test |
Build failed |
Build failed |
@swift-ci please test Windows platform |
Enable WASI environment and
wasm32
architecture inlit.cfg
. It useswasmer
as the test runner, which can be easily installed on macOS withbrew install wasmer
. After a quick comparison,wasmer
is the fastest one, we previously triedwasmtime
before replacing it withwasmer
in swiftwasm#451, which made CI run faster in our fork PRs.As there's no official support for the WebAssembly target and no Jenkins nodes set up, this will serve for local testing, but I would hope that we could have a Jenkins node set up at some point.
Related to SR-9307.
(cc @DougGregor @compnerd @kateinoigakukun)