-
Notifications
You must be signed in to change notification settings - Fork 206
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
[NativeAOT-LLVM] Enable support for WASI SDK #1850
Closed
Closed
Conversation
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
add flag to call to indicate if there is a hidden parameter include delegates test fix for store in between phi nodes
…table Remove gtHasHiddenArgument Addresses feedback
Enables opening of files in WASI hosts
# Conflicts: # src/coreclr/jit/llvm.cpp # src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets
Cedtur
approved these changes
Feb 27, 2022
jkotas
added
the
area-NativeAOT-LLVM
LLVM generation for Native AOT compilation (including Web Assembly)
label
Nov 14, 2022
Do you know what the current state of this effort is @yowl ? Thanks! |
What I did here was a hack really to workaround different c header constants in the different libc(s). There's maybe at least 2 ways to go forward with this
So the state of the effort is that the IT problem is understood (I think!) , but the human time problem is harder to solve! |
1 task
Closing this one in favour of #2268 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for linking with the WASI SDK to enable opening of files on WASI hosts, e.g. wasmtime.
I'm changing the build property
EmccExtraArgs
toWasmExtraLinkerArgs
as it only applies at the linking step and now applies to both Emscripten and Wasi SDK.Adding build property
WasmWasi
to indicate that the build is for WASI, this turns off some unsupported Emscripten features, exceptions mainly.Adding build property
WasiSdkPath
(which impliesWasmWasi
). This causes the linking to be done by the Wasi SDK, and hence links the WASI SDK libc which has good support for WASI.Added a hack to get around the fact that we compile the runtime with emscripten's headers, but use libc from the WASI SDK where some constants are different. I'm using the
FileOptions
to set a bit to indicate "when opening files, use the WASI SDK constants". I did think about adding new enum values to other parameters tonew FileStream
but that breaks the ABI checks. To use this hack, the user code would be:WIP as not sure this is a good idea. wasi-libc originates from cloudlibc which has the different constants: Emscripten and musl are the same. The alternative fix here would be to not use the libc file operations at all, but to straight to the wasi calls. That would mean that running in Emscripten would not work as WASI in Emscripten is a WIP.
Updated the documentation.
Follows #1848