-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[wasm] Add metadata registration for WebAssembly #66543
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
[wasm] Add metadata registration for WebAssembly #66543
Conversation
@swift-ci Please smoke test |
Can anything here be deduped from the ELF implementation? They two implementations are very similar. |
Good point! I think the list of section names can be shared by X-macro. But I'd like to leave it as is because there is no guarantee that ELF and Wasm use the same section structure and I couldn't figure out good name to express ELF and Wasm things. 😅 |
78958da
to
1b75ea8
Compare
Maybe just rename the existing ELF file "SwiftRT-ELF-WASM.cpp", and add |
1b75ea8
to
7ac6c30
Compare
@grynspan Thank you for feedback and sorry for my slow response (I was sick last week.. 😵) |
This patch adds the metadata registration for the wasm targets, and also adds build support for it.
7ac6c30
to
8d84a64
Compare
@swift-ci Please smoke test |
I'm glad you're feeling better. :) This looks really good to me! Please be sure to get a review from the core Swift team before merging. :) |
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.
LGTM.
I wasn't 100% sure about the ELF and WASM versions sharing the .cpp
file, but it looks like the implementation is very similar so I can see why you did that.
Thank you all for your kind reviews! |
SwiftRT-WASM.cpp
We can actually probably merge the COFF implementation in too, and then this file gets renamed "SwiftRT.cpp" and world peace is achieved. Edit: Eh, that one's enough different that never mind. |
This patch adds the metadata registration for the wasm targets, and also adds build support for it.