[K/N] Introduce external calls checker compiler option

This commit is contained in:
Pavel Kunyavskiy
2021-06-09 13:24:20 +03:00
committed by Space
parent 271fc35082
commit 1ba04fdd21
3 changed files with 6 additions and 0 deletions
@@ -189,6 +189,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
put(PRINT_DESCRIPTORS, arguments.printDescriptors)
put(PRINT_LOCATIONS, arguments.printLocations)
put(PRINT_BITCODE, arguments.printBitCode)
put(CHECK_EXTERNAL_CALLS, arguments.checkExternalCalls)
put(PRINT_FILES, arguments.printFiles)
put(PURGE_USER_LIBS, arguments.purgeUserLibs)
@@ -195,6 +195,9 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-Xprint-bitcode", deprecatedName = "--print_bitcode", description = "Print llvm bitcode")
var printBitCode: Boolean = false
@Argument(value = "-Xcheck-state-at-external-calls", description = "Check all calls of possibly long external functions are done in Native state")
var checkExternalCalls: Boolean = false
@Argument(value = "-Xprint-descriptors", deprecatedName = "--print_descriptors", description = "Print descriptor tree")
var printDescriptors: Boolean = false
@@ -100,6 +100,8 @@ class KonanConfigKeys {
= CompilerConfigurationKey.create("export KDoc into klib and framework")
val PRINT_BITCODE: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("print bitcode")
val CHECK_EXTERNAL_CALLS: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("check external calls")
val PRINT_DESCRIPTORS: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("print descriptors")
val PRINT_IR: CompilerConfigurationKey<Boolean>