Add emcc toolchain for WASM builds using Emscripten#2
Add emcc toolchain for WASM builds using Emscripten#2waruqi merged 4 commits intoxmake-io:masterfrom
emcc toolchain for WASM builds using Emscripten#2Conversation
|
We should add a toolchain named (emcc). like this Line 2840 in 6b1fa8e and add a new platform and arch, then run and we can improve to detect platform/arch in emcc envs. so we just need |
|
Added a new toolchain called |
457faab to
03b2805
Compare
|
and you can check envs to detect wasm platform and arch automatically. Line 637 in 7122388 |
Do you have a suggestion for which environment variable to check? It looks like |
emcc toolchain for WASM builds using Emscripten
|
Looks like docker run -v `pwd`:`pwd` -w `pwd` -u $(id -u):$(id -g) emscripten/emsdk /bin/sh -c "./configure"Output: |
|
ok, thanks! |
|
Thank you, too! |
First of all, thanks so much for creating this project, it fits my requirements perfectly! I wanted a better way to build widely cross-platform apps without relying on CMake, etc, and I happened to find XMake and xmake.sh a few weeks ago. Great work!
This PR updates
path_toolnameto detect the names of the Emscripten tools so thatconfigurecan be used with theemconfigurecommand. After these changes (and installing the Emscripten SDK), one can build their project for the web by using the following commands:I'm not sure if a full toolchain description should be added for Emscripten instead, but these minimal changes seemed to be enough to get everything working perfectly on my end.