Skip to content
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

Update LLVM to 18.1.2 and add wasm-component-ld #402

Merged
merged 8 commits into from
Apr 11, 2024

Conversation

alexcrichton
Copy link
Collaborator

This commit has two intertwined changes within it. First the LLVM submodule is updated to the 18.1.2 release branch. This alone would cause CI and tests to fail due to differing behavior for the wasm32-wasip2 target. To fix these test failures the wasm-component-ld tool is added to the build. This tool is a Rust-written tool and installed via cargo install as part of the build at a pinned version written in the Makefile. This linker, used for components, is then used for the wasm32-wasip2 target.

Tests and CI are then updated to skip the need to have wasm-tools or the adapter for WASI when making components since that's now the job of wasm-component-ld. This then necessitated some changes to tests too.

@alexcrichton alexcrichton mentioned this pull request Mar 29, 2024
Makefile Show resolved Hide resolved
This commit has two intertwined changes within it. First the LLVM
submodule is updated to the 18.1.2 release branch. This alone would
cause CI and tests to fail due to differing behavior for the
`wasm32-wasip2` target. To fix these test failures the
`wasm-component-ld` tool is added to the build. This tool is a
Rust-written tool and installed via `cargo install` as part of the build
at a pinned version written in the `Makefile`. This linker, used for
components, is then used for the `wasm32-wasip2` target.

Tests and CI are then updated to skip the need to have `wasm-tools` or
the adapter for WASI when making components since that's now the job of
`wasm-component-ld`. This then necessitated some changes to tests too.
@alexcrichton
Copy link
Collaborator Author

@sbc100 or @sunfishcode did y'all have further thoughts on this?

@sbc100
Copy link
Member

sbc100 commented Apr 5, 2024

I'm little wary about this new linker which is outside of llvm and written in rust, but that could also be my lack of familiarity with it. I think it would be great if it could one day be part of llvm or wasm-ld itself. Since I have not really been involved with the preview2 or component model stuff myself so I'll leave to you all to decide what is best here. I'll defer to @sunfishcode for the final lgtm.

@alexcrichton
Copy link
Collaborator Author

ping @sunfishcode, do you have thoughts on this?

@sunfishcode
Copy link
Member

sunfishcode commented Apr 11, 2024

I think this change makes sense for now, and we'll see how it goes. In the future when the wasip2 support in wasi-libc is more complete, and we don't need adapters or adapter linking in the common case, then the components should be more like simple containers, so it should be easier to add component support to wasm-ld if we want to.

@sunfishcode sunfishcode merged commit 392035c into WebAssembly:main Apr 11, 2024
5 checks passed
@alexcrichton alexcrichton deleted the update-to-llvm-18.1.2 branch April 11, 2024 18:14
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.

3 participants