Open directhex opened 1 year ago
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Author: | directhex |
---|---|
Assignees: | - |
Labels: | `arch-wasm`, `discussion`, `os-wasi` |
Milestone: | - |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
/cc @akoeplinger @radical
The existing metabuild system in charge of dispatching the above builds is GNU Make. This needs replacing with something we support, e.g. MSBuild (we have experience using MSBuild as a metabuild system, e.g. for LLVM or ICU)
We could also add another metabuild layer on top and just call the Makefile from MSBuild :)
I'm also leaning towards option 2.
Tagging subscribers to this area: @directhex See info in area-owners.md if you want to be subscribed.
Author: | directhex |
---|---|
Assignees: | - |
Labels: | `arch-wasm`, `discussion`, `area-Infrastructure-mono`, `os-wasi` |
Milestone: | - |
OK, so, first real crossroads in option 2:
We need to build three things from the llvm-project.git repo:
I have successfully built 1 from dotnet/llvm-project - version 14 - and 2/3 from wasi-sdk/src/llvm(llvm/llvm-project) - version 15. It seems to work, for now.
We can't just build compiler-rt and libcxx out of our llvm repo build, because we need to link against wasi-libc (so we would need to submodule wasi-libc into our llvm fork, and we're deep on a road to madness here). So our options are:
Redirect the submodule in our wasi-sdk fork to dotnet/llvm-project so we build those projects out of our source tree but as part of the wasi-sdk repo (so the version numbers match between clang/llvm and compiler-rt/libcxx)
Option 2 here is the current planned route.
I think we are close here @steveisok
Ref. https://github.com/dotnet/runtime/issues/65895
We need a way to ship the WASI SDK to users (as a nupkg). Currently, for builds, we're using binaries shipped out of the WebAssembly wasi-sdk.git releases page.
I'm investigating this process.
wasi-sdk consists of three git submodules:
llvm/llvm-project.git
WebAssembly/wasi-libc.git
https://git.savannah.gnu.org/git/config.git
(GNUconfig.guess
/config.sub
scripts)These are used to build FIVE projects in turn (or three, depending on how you count):
lld;clang;clang-tools-extra
subsets) withWebAssembly
codegen andwasm32-wasi
default compiler triple. This needs to be built once for every platform we want to be able to build Wasi apps onlibclang_rt.builtins-wasm32.a
). This only needs to be built once, and can be consumed on any OSThe existing metabuild system in charge of dispatching the above builds is GNU Make. This needs replacing with something we support, e.g. MSBuild (we have experience using MSBuild as a metabuild system, e.g. for LLVM or ICU)
There are a few approaches we can take on how best to get this built.
I'm starting to lean towards option 2, with a "damn the consequences" approach to command line flags, but I think the discussion is worth having.