Skip to content

Commit ab71e68

Browse files
GitHub Actions/Emscripten: strip debug information to fix the toolchain crash
1 parent 33bf4c9 commit ab71e68

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/build-emscripten.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
uses: DiligentGraphics/github-action/configure-cmake@v1
4545
with:
4646
build-type: ${{ matrix.build_type }}
47-
cmake-args: "-DDILIGENT_BUILD_CORE_INCLUDE_TEST=ON -DDILIGENT_BUILD_CORE_TESTS=ON"
47+
cmake-args: "-DDILIGENT_BUILD_CORE_INCLUDE_TEST=ON -DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO=ON"
4848

4949
- name: Build
5050
if: success()

Tests/DiligentCoreAPITest/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ if (PLATFORM_EMSCRIPTEN)
9595
set(HTML_TEMPLATE_FILE ${PROJECT_SOURCE_DIR}/resources/emscripten_template.html)
9696
target_link_options(DiligentCoreAPITest PRIVATE "SHELL: -s SINGLE_FILE -s ALLOW_MEMORY_GROWTH=1 --preload-file '${RESOURCE_PATH}@'")
9797
target_link_options(DiligentCoreAPITest PRIVATE "SHELL: --shell-file '${HTML_TEMPLATE_FILE}'")
98+
target_link_options(DiligentCoreAPITest PRIVATE "SHELL: -s WASM_BIGINT -s WASM=1")
99+
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND DILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO)
100+
target_link_options(DiligentCoreAPITest PRIVATE "SHELL: -gseparate-dwarf -g0")
101+
endif()
98102
endif()
99103

100104
target_link_libraries(DiligentCoreAPITest

0 commit comments

Comments
 (0)