changeset 4075:ea95eecead6f framework

notes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 17 Jun 2020 18:19:45 +0200
parents 7116e34221fe
children eab8010c05fc
files OrthancFramework/Resources/CMake/EmscriptenParameters.cmake
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/EmscriptenParameters.cmake	Mon Jun 15 17:22:19 2020 +0200
+++ b/OrthancFramework/Resources/CMake/EmscriptenParameters.cmake	Wed Jun 17 18:19:45 2020 +0200
@@ -1,8 +1,14 @@
+# https://github.com/emscripten-core/emscripten/blob/master/src/settings.js
+
 if (NOT "${EMSCRIPTEN_TRAP_MODE}" STREQUAL "")
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s BINARYEN_TRAP_MODE='\"${EMSCRIPTEN_TRAP_MODE}\"'")
 endif()
 
+# "DISABLE_EXCEPTION_CATCHING" is a "compile+link" option. HOWEVER,
+# setting it inside "WASM_FLAGS" creates link errors, at least with
+# side modules. TODO: Understand why
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
+#set(WASM_FLAGS "${WASM_FLAGS} -s DISABLE_EXCEPTION_CATCHING=0")
 
 if (EMSCRIPTEN_TARGET_MODE STREQUAL "wasm")
   # WebAssembly