Mercurial > hg > orthanc-stone
changeset 1918:fc6009c43bd9
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Mar 2022 12:12:25 +0100 |
parents | 9c52c0376ad7 |
children | ed4831e08961 |
files | OrthancStone/Resources/Orthanc/CMake/EmscriptenParameters.cmake |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancStone/Resources/Orthanc/CMake/EmscriptenParameters.cmake Mon Mar 21 10:29:47 2022 +0100 +++ b/OrthancStone/Resources/Orthanc/CMake/EmscriptenParameters.cmake Mon Mar 21 12:12:25 2022 +0100 @@ -25,6 +25,12 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s BINARYEN_TRAP_MODE='\"${EMSCRIPTEN_TRAP_MODE}\"'") endif() +# If "-O3" is used (the default in "Release" mode), this results in a +# too large memory consumption in "wasm-opt", at least in Emscripten +# 3.1.7, which ultimately crashes the compiler. So we force "-O2" +# (this also has the advantage of speeding up the build): +set(CMAKE_CXX_FLAGS_RELEASE "-O2") + # "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