summaryrefslogtreecommitdiffstats
path: root/source/compiler-core
diff options
context:
space:
mode:
authorAnders Leino <aleino@nvidia.com>2024-10-11 13:13:04 +0300
committerGitHub <noreply@github.com>2024-10-11 18:13:04 +0800
commitdfab34e4bf508fc517d4d645ebb3b6b1179a5003 (patch)
tree0a75a9618ffdbd0604145cade8dbaff7b2af01cd /source/compiler-core
parent5fa35fcce532267a2ae5779dee9ff4d07fab6bf4 (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 'source/compiler-core')
-rw-r--r--source/compiler-core/slang-diagnostic-sink.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/compiler-core/slang-diagnostic-sink.cpp b/source/compiler-core/slang-diagnostic-sink.cpp
index 7e3c286eb..a4cbce22f 100644
--- a/source/compiler-core/slang-diagnostic-sink.cpp
+++ b/source/compiler-core/slang-diagnostic-sink.cpp
@@ -574,7 +574,8 @@ bool DiagnosticSink::diagnoseImpl(DiagnosticInfo const& info, const UnownedStrin
if (info.severity >= Severity::Fatal)
{
// TODO: figure out a better policy for aborting compilation
- SLANG_ABORT_COMPILATION("");
+ std::string message(formattedMessage.begin(), formattedMessage.end());
+ SLANG_ABORT_COMPILATION(message.c_str());
}
return true;
}