Native: use binary options machinery for runtime assertions mode
This commit is contained in:
committed by
Space
parent
7cc1ea8801
commit
ee3663afa4
@@ -319,15 +319,6 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
||||
configuration.report(ERROR, "-Xgc-aggressive is only supported for -memory-model experimental")
|
||||
}
|
||||
put(GARBAGE_COLLECTOR_AGRESSIVE, arguments.gcAggressive)
|
||||
put(RUNTIME_ASSERTS_MODE, when (arguments.runtimeAssertsMode) {
|
||||
"ignore" -> RuntimeAssertsMode.IGNORE
|
||||
"log" -> RuntimeAssertsMode.LOG
|
||||
"panic" -> RuntimeAssertsMode.PANIC
|
||||
else -> {
|
||||
configuration.report(ERROR, "Unsupported runtime asserts mode ${arguments.runtimeAssertsMode}")
|
||||
RuntimeAssertsMode.IGNORE
|
||||
}
|
||||
})
|
||||
put(PROPERTY_LAZY_INITIALIZATION, when (arguments.propertyLazyInitialization) {
|
||||
null -> {
|
||||
when (memoryModel) {
|
||||
|
||||
-3
@@ -326,9 +326,6 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value = "-Xir-property-lazy-initialization", valueDescription = "{disable|enable}", description = "Initialize top level properties lazily per file")
|
||||
var propertyLazyInitialization: String? = null
|
||||
|
||||
@Argument(value="-Xruntime-asserts-mode", valueDescription = "<mode>", description = "Enable asserts in runtime. Possible values: 'ignore', 'log', 'panic'")
|
||||
var runtimeAssertsMode: String? = "ignore"
|
||||
|
||||
// TODO: Remove when legacy MM is gone.
|
||||
@Argument(
|
||||
value = "-Xworker-exception-handling",
|
||||
|
||||
Reference in New Issue
Block a user