mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-18 21:18:10 +00:00
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.
This commit is contained in:
parent
5f6303f985
commit
0cbe94256e
2
.github/workflows/preview_build.yml
vendored
2
.github/workflows/preview_build.yml
vendored
@ -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::"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user