More work towards a wasip3 target#636
Conversation
|
@TartanLlama building this PR, with this minor patch on wasi-libc, currently yields: This is with LLVM assertions enabled. I think this has to do with some features/etc related work on #200855, but I'm not exactly sure what. Would it be helpful to have a standalone reproducer? |
|
@alexcrichton it's cause you also need |
43de540 to
70f3d82
Compare
|
Ok @TartanLlama I've now got CI passing here and on wasi-libc. The changes I found necessary which I wanted to flag are:
Some bugs/issues I've found while doing this:
(;@f3f ;) (func $__wasm_set_tls_base (;45;) (type 0) (param i32)
(;@f40 ;) local.get 0
(;@f42 ;) call $__wasm_component_model_builtin_context_get_0
(;@f48 ;) )
(;@c40 ;) (func $__wasm_init_memory (;31;) (type 10)
(;@c41 ;) i32.const 65536
(;@c45 ;) i32.const 65536
(;@c49 ;) call $__wasm_set_tls_base
(;@c4b ;) i32.const 0
(;@c4d ;) i32.const 108
(;@c50 ;) memory.init $.tdata
(;@c54 ;) i32.const 69456
(;@c58 ;) i32.const 0
(;@c5a ;) i32.const 840
(;@c5d ;) memory.fill
(;@c60 ;) )
...
(;@b5b ;) (global $__init_tls_base (;1;) i32 i32.const 0)
...
(;@c40 ;) (func $__wasm_init_memory (;31;) (type 10)
...
(;@c45 ;) i32.const 65536
(;@c49 ;) call $__wasm_set_tls_base
... |
This commit updates the LLVM submodule to the latest tip-of-tree to be able to build the wasip3 target with the correct ABI. This additionally modifies some `*.patch` files by removing those already landed, undoing a small part of a PR that landed in LLVM, etc. This then additionally fixes some minor wasip3 build issues, such as using the correct compiler-rt and updating Wasmtime to not need flags.
Drawing inspiration from WebAssembly#640
|
@dicej I'm flagging you for review on this if that's ok -- my plan here is to (a) land this PR, (b) make a |
This is a work-in-progress to get things enabled. The main bulk of the change here is updating LLVM itself to tip-of-tree as of yesterday morning. This removes two
*.patchfiles because they've landed, and adds another*.patchfile to work around a new issue that's cropped up. I've also included a*.patchfor llvm/llvm-project#200855, too.This isn't ready yet to land as it's still failing to build/link/etc, and I'll comment some more below.