Change: upgrade emscripten from 3.1.57 to 6.0.1 (#15780)

This commit is contained in:
rubidium42
2026-06-27 17:00:51 +02:00
committed by GitHub
parent dc87cd3d7a
commit b9986cdadf
4 changed files with 6 additions and 23 deletions
+2 -9
View File
@@ -14,7 +14,7 @@ jobs:
container: container:
# If you change this version, change the numbers in the cache step, # If you change this version, change the numbers in the cache step,
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too. # .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
image: emscripten/emsdk:3.1.57 image: emscripten/emsdk:6.0.1
steps: steps:
- name: Checkout - name: Checkout
@@ -24,20 +24,13 @@ jobs:
run: | run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE} git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Update to modern GCC
run: |
apt-get update
apt-get install -y gcc-12 g++-12
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
- name: Setup cache - name: Setup cache
uses: actions/cache@v5 uses: actions/cache@v5
with: with:
# If you change this version, change the numbers in the image configuration step, # If you change this version, change the numbers in the image configuration step,
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too. # .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
path: /emsdk/upstream/emscripten/cache path: /emsdk/upstream/emscripten/cache
key: 3.1.57-${{ runner.os }} key: 6.0.1-${{ runner.os }}
- name: Add liblzma support - name: Add liblzma support
run: | run: |
+2 -9
View File
@@ -11,7 +11,7 @@ jobs:
container: container:
# If you change this version, change the numbers in the cache step, # If you change this version, change the numbers in the cache step,
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too. # .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
image: emscripten/emsdk:3.1.57 image: emscripten/emsdk:6.0.1
steps: steps:
- name: Checkout - name: Checkout
@@ -24,20 +24,13 @@ jobs:
git config --global --add safe.directory ${GITHUB_WORKSPACE} git config --global --add safe.directory ${GITHUB_WORKSPACE}
git checkout -b pr${{ github.event.pull_request.number }} git checkout -b pr${{ github.event.pull_request.number }}
- name: Update to modern GCC
run: |
apt-get update
apt-get install -y gcc-12 g++-12
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
- name: Setup cache - name: Setup cache
uses: actions/cache@v5 uses: actions/cache@v5
with: with:
path: /emsdk/upstream/emscripten/cache path: /emsdk/upstream/emscripten/cache
# If you change this version, change the numbers in the image configuration step, # If you change this version, change the numbers in the image configuration step,
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too. # .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
key: 3.1.57-${{ runner.os }} key: 6.0.1-${{ runner.os }}
- name: Add liblzma support - name: Add liblzma support
run: | run: |
+1 -1
View File
@@ -370,7 +370,7 @@ if(EMSCRIPTEN)
add_definitions(-s DISABLE_EXCEPTION_CATCHING=0) add_definitions(-s DISABLE_EXCEPTION_CATCHING=0)
# Export functions to Javascript. # Export functions to Javascript.
target_link_libraries(WASM::WASM INTERFACE "-s EXPORTED_FUNCTIONS='[\"_main\", \"_em_openttd_add_server\"]' -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'") target_link_libraries(WASM::WASM INTERFACE "-s EXPORTED_FUNCTIONS='[\"_main\", \"_em_openttd_add_server\"]' -s EXPORTED_RUNTIME_METHODS='[\"cwrap\", \"HEAPU8\"]'")
# Preload all the files we generate during build. # Preload all the files we generate during build.
# As we do not compile with FreeType / FontConfig, we also have no way to # As we do not compile with FreeType / FontConfig, we also have no way to
+1 -4
View File
@@ -1,11 +1,8 @@
# If you change this version, change the numbers in .github/workflows/ci-emscripten.yml (2x) # If you change this version, change the numbers in .github/workflows/ci-emscripten.yml (2x)
# and .github/workflows/preview-build.yml (2x) too. # and .github/workflows/preview-build.yml (2x) too.
FROM emscripten/emsdk:3.1.57 FROM emscripten/emsdk:6.0.1
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y gcc-12 g++-12 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*