diff options
| author | Anders Leino <aleino@nvidia.com> | 2024-10-11 13:13:04 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-11 18:13:04 +0800 |
| commit | dfab34e4bf508fc517d4d645ebb3b6b1179a5003 (patch) | |
| tree | 0a75a9618ffdbd0604145cade8dbaff7b2af01cd /CMakePresets.json | |
| parent | 5fa35fcce532267a2ae5779dee9ff4d07fab6bf4 (diff) | |
Add slang-wasm target (#5237)
Support for exceptions is enabled, since Slang uses them for diagnostics.
The size optimization arguments ('-Os') resolves some internal emscripten error during the
slang-wasm.wasm linking step, which happens when enabling exceptions.
("parse exception: too many locals")
Diffstat (limited to 'CMakePresets.json')
| -rw-r--r-- | CMakePresets.json | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakePresets.json b/CMakePresets.json index 7b847e03e..47a733ee2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -22,7 +22,9 @@ "binaryDir": "${sourceDir}/build.em", "cacheVariables": { "SLANG_SLANG_LLVM_FLAVOR": "DISABLE", - "CMAKE_EXE_LINKER_FLAGS": "-sASSERTIONS -sALLOW_MEMORY_GROWTH" + "CMAKE_C_FLAGS_INIT": "-fwasm-exceptions -Os", + "CMAKE_CXX_FLAGS_INIT": "-fwasm-exceptions -Os", + "CMAKE_EXE_LINKER_FLAGS": "-sASSERTIONS -sALLOW_MEMORY_GROWTH -fwasm-exceptions --export=__cpp_exception" } }, { @@ -89,7 +91,7 @@ "configurePreset": "emscripten", "configuration": "Release", "targets": [ - "slang" + "slang-wasm" ] }, { |
