Mercurial > hg > orthanc
comparison Resources/CMake/Compiler.cmake @ 3599:e01900f913e7
fix duplicate symbol "jaritab" in wasm
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jan 2020 10:53:32 +0100 |
parents | 589238dcd782 |
children | d5cf43519a49 |
comparison
equal
deleted
inserted
replaced
3598:f2df51bff2fd | 3599:e01900f913e7 |
---|---|
197 | 197 |
198 # The BINARYEN_TRAP_MODE specifies what to do when divisions per | 198 # The BINARYEN_TRAP_MODE specifies what to do when divisions per |
199 # zero (and similar conditions like integer overflows) are | 199 # zero (and similar conditions like integer overflows) are |
200 # encountered: The "clamp" mode avoids throwing errors, as they | 200 # encountered: The "clamp" mode avoids throwing errors, as they |
201 # cannot be properly catched by "try {} catch (...)" constructions. | 201 # cannot be properly catched by "try {} catch (...)" constructions. |
202 if (EMSCRIPTEN_SET_LLVM_WASM_BACKEND) | 202 # Setting this option to "ON" fixes error: "shared:ERROR: |
203 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") | 203 # BINARYEN_TRAP_MODE is not supported by the LLVM wasm backend" if |
204 else() | 204 # using the "upstream" backend of Emscripten. |
205 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]' -s BINARYEN_TRAP_MODE='\"clamp\"'") | 205 if (NOT EMSCRIPTEN_SET_LLVM_WASM_BACKEND) |
206 endif() | 206 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s BINARYEN_TRAP_MODE='\"clamp\"'") |
207 | 207 endif() |
208 | |
209 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s EXTRA_EXPORTED_RUNTIME_METHODS='[\"ccall\", \"cwrap\"]'") | |
210 | |
208 elseif (CMAKE_SYSTEM_NAME STREQUAL "Android") | 211 elseif (CMAKE_SYSTEM_NAME STREQUAL "Android") |
209 | 212 |
210 else() | 213 else() |
211 message("Unknown target platform: ${CMAKE_SYSTEM_NAME}") | 214 message("Unknown target platform: ${CMAKE_SYSTEM_NAME}") |
212 message(FATAL_ERROR "Support your platform here") | 215 message(FATAL_ERROR "Support your platform here") |