Skip to content

Copy WasmKit to host_install_destdir #81178

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 6 commits into from
May 12, 2025
Merged

Copy WasmKit to host_install_destdir #81178

merged 6 commits into from
May 12, 2025

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Apr 29, 2025

This enables swift run and swift test to use WasmKit when cross-compiling to Wasm with Swift SDKs that have toolsets pointing to WasmKit.

rdar://150382758

This enables `swift run` and `swift test` to use WasmKit when cross-compiling to Wasm with Swift SDKs that have toolsets pointing to WasmKit.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain

@MaxDesiatov MaxDesiatov marked this pull request as ready for review April 30, 2025 19:03
@MaxDesiatov MaxDesiatov requested a review from bnbarham April 30, 2025 19:03
@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

bnbarham
bnbarham previously approved these changes Apr 30, 2025
@@ -1346,6 +1346,7 @@ playgroundsupport
indexstore-db
sourcekit-lsp
swiftdocc
wasmkit
Copy link
Contributor

Choose a reason for hiding this comment

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

How much time does this add?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

16:57:25  Build Percentage 	 Build Duration (sec) 	 Build Phase
16:57:25  ================ 	 ==================== 	 ===========
16:57:25  0.3%              	 67.98                 	 Building wasmkit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Installation takes less than a second.

@bnbarham bnbarham dismissed their stale review May 1, 2025 04:27

Also need to build and install for Windows (though install isn't in this repo)

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain

Copy link
Member

@kateinoigakukun kateinoigakukun left a comment

Choose a reason for hiding this comment

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

Currently WasmKit CLI is built using Swift toolchain already installed on the host, not the just-built one. So it's linked with the host libswiftCore.so now, but we should build it with the just-built toolchain to make it use toolchain-local libswiftCore.so instead.

@MaxDesiatov MaxDesiatov requested a review from bnbarham May 1, 2025 16:19
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain

@MaxDesiatov MaxDesiatov added WebAssembly Platform: WebAssembly WASI WebAssembly System Interface support labels May 8, 2025
@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain linux

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test linux

@MaxDesiatov MaxDesiatov changed the title Copy WasmKit to install_destdir Copy WasmKit to self.host_install_destdir May 9, 2025
@MaxDesiatov MaxDesiatov changed the title Copy WasmKit to self.host_install_destdir Copy WasmKit to host_install_destdir May 9, 2025
@MaxDesiatov
Copy link
Contributor Author

MaxDesiatov commented May 9, 2025

Linux failures are legit with rpath not set correctly for WasmKit, addressing that...

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci build toolchain

@MaxDesiatov MaxDesiatov enabled auto-merge May 11, 2025 16:37
@MaxDesiatov MaxDesiatov merged commit eac419b into main May 12, 2025
7 of 8 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/install-wasmkit branch May 12, 2025 01:27
MaxDesiatov added a commit that referenced this pull request May 14, 2025
6.2: Copy WasmKit to `host_install_destdir`

Cherry-pick of #81178, merged as eac419b

**Explanation**: This enables `swift run` and `swift test` to use WasmKit when cross-compiling to Wasm with Swift SDKs that have toolsets pointing to WasmKit.
**Scope**: limited to swift.org toolchains and a single WasmKit product. No other build products are changed.
**Risk**: low, the change is additive and doesn't impact anything other than this single product.
**Testing**: automated testing via github.com/swiftlang/swift-integration-tests
**Issue**: rdar://150382758
**Reviewer**: @bnbarham
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WASI WebAssembly System Interface support WebAssembly Platform: WebAssembly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants