[K/N] Logging for runtime

This commit is contained in:
Alexander Shabalin
2021-08-25 08:04:01 +00:00
committed by Space
parent 516c2933ce
commit a279b2230f
24 changed files with 772 additions and 36 deletions
@@ -359,6 +359,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
}
}
})
putIfNotNull(RUNTIME_LOGS, arguments.runtimeLogs)
parseBinaryOptions(arguments, configuration).forEach { optionWithValue ->
configuration.put(optionWithValue)
@@ -348,6 +348,9 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
)
var binaryOptions: Array<String>? = null
@Argument(value = "-Xruntime-logs", valueDescription = "<tag1=level1,tag2=level2,...>", description = "Enable logging for runtime with tags.")
var runtimeLogs: String? = null
override fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> =
super.configureAnalysisFlags(collector, languageVersion).also {
val useExperimental = it[AnalysisFlags.useExperimental] as List<*>