2019-01-10 12:40:01 +00:00
|
|
|
PYODIDE_ROOT=$(abspath ..)
|
|
|
|
include ../Makefile.envs
|
|
|
|
|
2018-07-20 00:33:56 +00:00
|
|
|
all: emsdk/.complete
|
2018-03-30 17:08:06 +00:00
|
|
|
|
2020-12-06 10:36:37 +00:00
|
|
|
emsdk/.complete: ../Makefile.envs $(wildcard patches/*.patch)
|
2018-07-18 22:45:20 +00:00
|
|
|
if [ -d emsdk ]; then rm -rf emsdk; fi
|
2021-01-07 08:01:25 +00:00
|
|
|
git clone --depth 1 https://github.com/emscripten-core/emsdk.git
|
2021-02-14 11:17:20 +00:00
|
|
|
cd emsdk && ./emsdk install --build=Release $(PYODIDE_EMSCRIPTEN_VERSION)
|
2021-02-10 08:23:10 +00:00
|
|
|
git clone https://github.com/WebAssembly/binaryen.git emsdk/binaryen
|
2021-02-14 11:17:20 +00:00
|
|
|
cd emsdk/binaryen && git checkout $(PYODIDE_BINARYEN_VERSION)
|
2020-12-06 10:36:37 +00:00
|
|
|
cat patches/*.patch | patch -p1
|
2021-02-14 11:17:20 +00:00
|
|
|
cd emsdk && ./emsdk activate --embedded --build=Release $(PYODIDE_EMSCRIPTEN_VERSION)
|
2021-02-08 08:42:43 +00:00
|
|
|
cmake -S emsdk/binaryen -B emsdk/binaryen -DBUILD_STATIC_LIB=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
2021-01-02 11:40:35 +00:00
|
|
|
make -C emsdk/binaryen -j5 wasm-opt
|
2021-02-06 07:58:12 +00:00
|
|
|
cp emsdk/binaryen/bin/wasm-opt emsdk/upstream/bin/
|
2020-12-06 10:36:37 +00:00
|
|
|
touch emsdk/.complete
|
2018-03-30 17:08:06 +00:00
|
|
|
|
2021-01-03 11:25:14 +00:00
|
|
|
.PHONY: test
|
|
|
|
test:
|
|
|
|
pytest tests/ -v
|
|
|
|
|
2018-03-30 17:08:06 +00:00
|
|
|
clean:
|
|
|
|
rm -rf emsdk
|