Skip to content

[Swift+WASM] Allow Wasm object format. #20687

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

Merged
merged 1 commit into from
Jan 4, 2019

Conversation

ddunbar
Copy link
Contributor

@ddunbar ddunbar commented Nov 20, 2018

  • This currently does nothing more than adopt the ELF conventions, but for the
    Wasm object file format.

 - This currently does nothing more than adopt the ELF conventions, but for the
   Wasm object file format.
@ddunbar
Copy link
Contributor Author

ddunbar commented Nov 20, 2018

Since it seems the most modern wasm triple also sets the wasm object file format (#20684), this is necessary when using that triple.

I don't really know the extent to which any of this makes sense, although my impression is that the wasm format is largely following ELF, so I imagine they aren't absolutely horrible defaults to start with exploring.

@ddunbar
Copy link
Contributor Author

ddunbar commented Nov 20, 2018

@swift-ci please smoke test

@compnerd
Copy link
Member

You're going to have to look at SwiftRT-ELF.cpp and make equivalences for the WASM object format. Additionally, do you know what linkers are supported? I think that you want to enable the ODR COMDAT semantics for WASM as I believe that lld is linker there and that works properly unlike gold or bfd.

@ddunbar
Copy link
Contributor Author

ddunbar commented Nov 20, 2018

@compnerd I believe that linking support is under active development, and as you say is only in lld. Thanks for the pointer, I'll take a look!

@jfbastien
Copy link
Contributor

You'll probably want to look at https://github.com/WebAssembly/tool-conventions

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know much about Wasm, but this looks reasonable as a variant of ELF

@MaxDesiatov
Copy link
Contributor

@ddunbar any updates on this? hope this could be merged soon

@ddunbar
Copy link
Contributor Author

ddunbar commented Jan 3, 2019

See https://bugs.swift.org/browse/SR-9307 for higher level status. I was wanting to get the Clang change landed first although there is probably no reason not to merge this one

@ddunbar
Copy link
Contributor Author

ddunbar commented Jan 3, 2019

@swift-ci please smoke test

@ddunbar
Copy link
Contributor Author

ddunbar commented Jan 4, 2019

Going ahead and merging this to unblock further poking... this will evolve and eventually get tests once enough other pieces are in that an end-to-end test can work.

@ddunbar ddunbar merged commit 8980213 into swiftlang:master Jan 4, 2019
@ddunbar ddunbar deleted the swasm-allow-wasm-object-format branch January 4, 2019 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants