[WASM] Add command line option to enable/disable assertions

This commit is contained in:
Igor Laevsky
2022-04-21 19:57:59 +03:00
committed by teamcity
parent c38985c93e
commit 3de1235fda
9 changed files with 25 additions and 9 deletions
@@ -256,6 +256,9 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-Xwasm-enable-array-range-checks", description = "Turn on range checks for the array access functions")
var wasmEnableArrayRangeChecks: Boolean by FreezableVar(false)
@Argument(value = "-Xwasm-enable-asserts", description = "Turn on asserts")
var wasmEnableAsserts: Boolean by FreezableVar(false)
override fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
return super.configureAnalysisFlags(collector, languageVersion).also {
it[allowFullyQualifiedNameInKClass] = wasm && wasmKClassFqn //Only enabled WASM BE supports this flag