mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 01:59:57 +00:00
Make it smaller
This commit is contained in:
@@ -27,10 +27,12 @@ $(OUT_WASM): $(CODEC_OUT)
|
|||||||
-I $(CODEC_DIR) \
|
-I $(CODEC_DIR) \
|
||||||
${CXXFLAGS} \
|
${CXXFLAGS} \
|
||||||
${LDFLAGS} \
|
${LDFLAGS} \
|
||||||
|
-mexec-model=reactor \
|
||||||
-o $@ \
|
-o $@ \
|
||||||
enc/mozjpeg_enc.cpp \
|
enc/mozjpeg_enc.cpp \
|
||||||
$(CODEC_OUT)
|
$(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
|
# 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.
|
# so we use libjpeg.la which implicitly builds that one instead.
|
||||||
|
|||||||
Binary file not shown.
@@ -7,5 +7,8 @@ RUN mkdir -p ${WASI_SDK_PREFIX} && \
|
|||||||
ENV BINARYEN_PREFIX "/opt/binaryen"
|
ENV BINARYEN_PREFIX "/opt/binaryen"
|
||||||
RUN mkdir -p ${BINARYEN_PREFIX} && \
|
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}
|
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
|
WORKDIR /src
|
||||||
CMD ["sh", "-c", "make -j`nproc`"]
|
CMD ["sh", "-c", "make -j`nproc`"]
|
||||||
|
|||||||
Reference in New Issue
Block a user