binji/wasm-clang

clang compilation

Opened this issue · 4 comments

How did you compile the clang into wasm? I am looking for a way how to cross compile C++ code into Arm M3 binary in browser and your project seems like good starting point for that.

binji commented

All the changes are pushed to https://github.com/binji/llvm-project. Unfortunately, I didn't write any notes about how I built it. All the changes are in the top commits here, though: https://github.com/binji/llvm-project/commits/master

Hi, I'm trying to make a in-web toolchain that build wasm. How do you configed the CMake to generate the llvm-project make file? It can't detect thread feature when I set the tool chain to wasi-sdk

binji commented

Hi @Avdpro, I can't quite remember how it all works, but I did have to hack threading a bit. Here's the change I made: binji/wasi-sdk@b6e735e.

Note that it pulls in llvm-project with this dummy threading implementation: binji/llvm-project@e3dc222...d0dcf97#diff-bfbf4cf0dfd0f4dbf0f6f82a943db2687ea1da605808286d26a6d51289c989a8

THX! Will try it now