-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[CI] Install libc6-dev-i386 to compile wasm32 #6886
Conversation
@kazum it would be great if we can still generate wasm32 that is compatible with the new WASI ABI. Is it possible to look a bit into it? |
@tqchen There are two kinds of WASI binaries, command and reactor, and what we generate in the test is a command. A WASI command may not export global variables, but we export two variables, If I changed the llvm linkage type of this line and this line to InternalLinkage, I could produce a compatible wasm32 which is runnable with the latest wasmtime, but I think the change is not acceptable for other targets. Another fix I came up with was localizing those variables with llvm-objcopy after we generate the wasm library. But the current llvm-objcopy has only initial support for wasm, so we cannot do it yet. I think it's a reasonable workaround to pin the wasmtime version until llvm-objcopy supports hiding global variables for wasm32. What do you think of it? |
Thanks @kazum what you said makes sense. We could actually change the LLVM codegen. Under the systemlib mode, it is not necessary to export these two global variables and since they are registered via a startup function. While it is not good to keep them as InternalLinkage (we might still need to make them weak). But we can skip the set dll export part of the codegen |
Looks good to me, was on vacation for a few days, thanks for the fix! |
@jroesch still need to update the images to reflect the change |
@tqchen these tests are only ran on CPU so I should only have to update that image right? |
Right |
* [CI] Pin wasmtime version to 0.16.0 * Keep the wasmtime version to the latest
* [CI] Pin wasmtime version to 0.16.0 * Keep the wasmtime version to the latest
* [CI] Pin wasmtime version to 0.16.0 * Keep the wasmtime version to the latest
The wasm32 test doesn't work with the current wasmtime (after the commit bytecodealliance/wasmtime#1565). It seems that we cannot generate a wasm binary which is compatible with the new WASI ABI.
This PR pins the wasmtime version to v0.16.0, the latest stable version which can work with our wasm32 test, and makes #6871 pass the CI. This also installs libc6-dev-i386 needed for wasm32 compilation.
@jroesch @tqchen @nhynes