From 0cbe94256e4f600ceb397ddf8c0e3dca60676e5b Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 14 Nov 2021 16:59:49 +0100 Subject: Change: [Emscripten] update to 2.0.34 and use Release over RelWithDebInfo (#9696) It turns out that having "-g" in the compile-statement causes Emscripten to pick -g3, which makes for very big binaries. This is very likely not your intention when building Emscripten, as smaller really is better. For comparison, with RelWithDebInfo the binary is ~80MB. With Release it is ~7.4MB. --- .github/workflows/preview_build.yml | 2 +- os/emscripten/Dockerfile | 2 +- os/emscripten/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/preview_build.yml b/.github/workflows/preview_build.yml index 345a2152d..2a280a6fc 100644 --- a/.github/workflows/preview_build.yml +++ b/.github/workflows/preview_build.yml @@ -76,7 +76,7 @@ jobs: echo "::group::CMake" emcmake cmake .. \ -DHOST_BINARY_DIR=../build-host \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DCMAKE_BUILD_TYPE=Release \ # EOF echo "::endgroup::" diff --git a/os/emscripten/Dockerfile b/os/emscripten/Dockerfile index cbbff38c1..5d54b5411 100644 --- a/os/emscripten/Dockerfile +++ b/os/emscripten/Dockerfile @@ -1,4 +1,4 @@ -FROM emscripten/emsdk:2.0.31 +FROM emscripten/emsdk:2.0.34 COPY emsdk-liblzma.patch / RUN cd /emsdk/upstream/emscripten && patch -p1 < /emsdk-liblzma.patch diff --git a/os/emscripten/README.md b/os/emscripten/README.md index 59f17c626..c78dc6727 100644 --- a/os/emscripten/README.md +++ b/os/emscripten/README.md @@ -24,7 +24,7 @@ Next, build the game with emscripten: ``` mkdir build - docker run -it --rm -v $(pwd):$(pwd) -u $(id -u):$(id -g) --workdir $(pwd)/build emsdk-lzma emcmake cmake .. -DHOST_BINARY_DIR=$(pwd)/build-host -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPTION_USE_ASSERTS=OFF + docker run -it --rm -v $(pwd):$(pwd) -u $(id -u):$(id -g) --workdir $(pwd)/build emsdk-lzma emcmake cmake .. -DHOST_BINARY_DIR=../build-host -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_ASSERTS=OFF docker run -it --rm -v $(pwd):$(pwd) -u $(id -u):$(id -g) --workdir $(pwd)/build emsdk-lzma emmake make -j5 ``` -- cgit v1.2.3-70-g09d2