mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Webclient: Set default stack size to 1 MB
Newer emscripten versions now only give a 64 KB stack by default (https://github.com/emscripten-core/emscripten/pull/18191) Older emscripten versions gave a 5 MB stack by default, so we can allocate 4 MB more for use by the game itself
This commit is contained in:
parent
1c4a3c067a
commit
936abbf453
3 changed files with 8 additions and 5 deletions
9
.github/workflows/build_linux32.yml
vendored
9
.github/workflows/build_linux32.yml
vendored
|
@ -11,6 +11,12 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install packages
|
||||
shell: bash
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install gcc-multilib libx11-dev:i386 libxi-dev:i386 libgl1-mesa-dev:i386
|
||||
- name: Compile 32 bit Linux builds
|
||||
shell: bash
|
||||
id: compile
|
||||
|
@ -18,9 +24,6 @@ jobs:
|
|||
COMMON_FLAGS: "-O1 -s -fno-stack-protector -fno-math-errno -Qn"
|
||||
NIX32_FLAGS: "-no-pie -fno-pie -m32 -fvisibility=hidden -fcf-protection=none -rdynamic -DCC_BUILD_ICON"
|
||||
run: |
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install gcc-multilib libx11-dev:i386 libxi-dev:i386 libgl1-mesa-dev:i386
|
||||
LATEST_FLAG=-DCC_COMMIT_SHA=\"$(git rev-parse --short "$GITHUB_SHA")\"
|
||||
|
||||
cd src
|
||||
|
|
2
Makefile
2
Makefile
|
@ -26,7 +26,7 @@ ifeq ($(PLAT),web)
|
|||
CC=emcc
|
||||
OEXT=.html
|
||||
CFLAGS=-g
|
||||
LDFLAGS=-s WASM=1 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 --js-library src/interop_web.js
|
||||
LDFLAGS=-s WASM=1 -s NO_EXIT_RUNTIME=1 -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_STACK=1Mb --js-library src/interop_web.js
|
||||
endif
|
||||
|
||||
ifeq ($(PLAT),mingw)
|
||||
|
|
|
@ -235,7 +235,7 @@ Install SDL2 port if needed
|
|||
|
||||
#### Web
|
||||
|
||||
```emcc *.c -s ALLOW_MEMORY_GROWTH=1 --js-library interop_web.js```
|
||||
```emcc *.c -s ALLOW_MEMORY_GROWTH=1 -s TOTAL_STACK=1Mb --js-library interop_web.js```
|
||||
|
||||
The generated javascript file has some issues. [See here for how to fix](doc/compile-fixes.md#webclient-patches)
|
||||
|
||||
|
|
Loading…
Reference in a new issue