Skip to content

Commit

Permalink
GitHub Actions/Emscripten: strip debug information to fix the toolcha…
Browse files Browse the repository at this point in the history
…in crash
  • Loading branch information
TheMostDiligent committed Feb 1, 2025
1 parent 33bf4c9 commit 1a59126
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-emscripten.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
uses: DiligentGraphics/github-action/configure-cmake@v1
with:
build-type: ${{ matrix.build_type }}
cmake-args: "-DDILIGENT_BUILD_CORE_INCLUDE_TEST=ON -DDILIGENT_BUILD_CORE_TESTS=ON"
cmake-args: "-DDILIGENT_BUILD_CORE_INCLUDE_TEST=ON -DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO=ON"

- name: Build
if: success()
Expand Down
4 changes: 4 additions & 0 deletions Tests/DiligentCoreAPITest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ if (PLATFORM_EMSCRIPTEN)
set(HTML_TEMPLATE_FILE ${PROJECT_SOURCE_DIR}/resources/emscripten_template.html)
target_link_options(DiligentCoreAPITest PRIVATE "SHELL: -s SINGLE_FILE -s ALLOW_MEMORY_GROWTH=1 --preload-file '${RESOURCE_PATH}@'")
target_link_options(DiligentCoreAPITest PRIVATE "SHELL: --shell-file '${HTML_TEMPLATE_FILE}'")
target_link_options(DiligentCoreAPITest PRIVATE "SHELL: -s WASM_BIGINT -s WASM=1")
if(${CMAKE_BUILD_TYPE} STREQUAL "Debug" AND DILIGENT_EMSCRIPTEN_STRIP_DEBUG_INFO)
target_link_options(${TARGET_NAME} PRIVATE "SHELL: -gseparate-dwarf -g0")
endif()
endif()

target_link_libraries(DiligentCoreAPITest
Expand Down

0 comments on commit 1a59126

Please sign in to comment.