-
Notifications
You must be signed in to change notification settings - Fork 10.5k
ClangImporter: pass _WASI_EMULATED_MMAN when triple is WASI #31689
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
Is there no intention of ever supporting |
It doesn't look like they're going to support it in this form without emulation:
I would assume that if it's ever supported, WASI would provide a different API for it. I think it would still make sense to use the current emulation API by default. |
Defaults here are problematic because WASI is still in flux. I really would prefer that we document the differences and make users aware of them and intentionally be explicit about the fact that there are differences from standard expectations. |
@compnerd since the original commit we've done plenty of changes on the WASI/Wasm side of things, for example we're requiring users to rely on From that perspective the exact way |
@swift-ci please smoke test |
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.
Is mman emulation the default and standard behaviour? Can the wasm VM not support it? I think that it may be better to actually require the user to spell this out in the command line of the driver invocation as -fwasm-features +emulated-mman
.
It isn't a Wasm feature, but a feature of WASI libc, so in that sense the answer is "yes". It's default and "standard" as long as we rely on WASI libc, I'm not aware of other libc implementations for Wasm. If we require our users to pass I don't think there's a way to build Swift stdlib with WASI, but without |
I think that my concern is that the libc itself doesn't define it. Another option to consider, if we can get it to work - add a header that is implicitly pulled in by the |
Defining
_WASI_EMULATED_MMAN
is required when compiling with WASI libc.Related to SR-9307.
(cc @compnerd)