[Wasm] Add compiler flag to disable exception handling proposal
Fail with unreachable instead of throwing an exception Merge-request: KT-MR-11481 Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
ec73815f80
commit
47ade4530c
+1
@@ -73,6 +73,7 @@ fun copyK2JSCompilerArguments(from: K2JSCompilerArguments, to: K2JSCompilerArgum
|
||||
to.wasmGenerateWat = from.wasmGenerateWat
|
||||
to.wasmKClassFqn = from.wasmKClassFqn
|
||||
to.wasmTarget = from.wasmTarget
|
||||
to.wasmUseTrapsInsteadOfExceptions = from.wasmUseTrapsInsteadOfExceptions
|
||||
|
||||
return to
|
||||
}
|
||||
|
||||
+10
@@ -630,6 +630,16 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
|
||||
field = if (value.isNullOrEmpty()) null else value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xwasm-use-traps-instead-of-exceptions",
|
||||
description = "Trap instead of throwing exceptions"
|
||||
)
|
||||
var wasmUseTrapsInsteadOfExceptions = false
|
||||
set(value) {
|
||||
checkFrozen()
|
||||
field = value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xforce-deprecated-legacy-compiler-usage",
|
||||
description = "The flag is used only for our inner infrastructure. It will be removed soon, so it's unsafe to use it nowadays."
|
||||
|
||||
Reference in New Issue
Block a user