Make it smaller

This commit is contained in:
Surma
2021-05-04 18:52:26 +01:00
parent be3688c8d3
commit 6820412ffd
3 changed files with 6 additions and 1 deletions

View File

@@ -27,10 +27,12 @@ $(OUT_WASM): $(CODEC_OUT)
-I $(CODEC_DIR) \
${CXXFLAGS} \
${LDFLAGS} \
-mexec-model=reactor \
-o $@ \
enc/mozjpeg_enc.cpp \
$(CODEC_OUT)
$(BINARYEN_PREFIX)/bin/wasm-opt -O3 -o $(OUT_WASM) $(OUT_WASM)
$(BINARYEN_PREFIX)/bin/wasm-opt -O4 -o $(OUT_WASM) $(OUT_WASM)
$(WABT_PREFIX)/bin/wasm-strip $(OUT_WASM)
# This one is a bit special: there is no rule for .libs/libjpeg.a
# so we use libjpeg.la which implicitly builds that one instead.

Binary file not shown.

View File

@@ -7,5 +7,8 @@ RUN mkdir -p ${WASI_SDK_PREFIX} && \
ENV BINARYEN_PREFIX "/opt/binaryen"
RUN mkdir -p ${BINARYEN_PREFIX} && \
curl -L https://github.com/WebAssembly/binaryen/releases/download/version_101/binaryen-version_101-x86_64-linux.tar.gz | tar -xz --strip 1 -C ${BINARYEN_PREFIX}
ENV WABT_PREFIX "/opt/wabt"
RUN mkdir -p ${WABT_PREFIX} && \
curl -L https://github.com/WebAssembly/wabt/releases/download/1.0.23/wabt-1.0.23-ubuntu.tar.gz | tar -xz --strip 1 -C ${WABT_PREFIX}
WORKDIR /src
CMD ["sh", "-c", "make -j`nproc`"]