Native: remove obsolete compiler flags that have no effect

Same for compiler configuration keys.
This commit is contained in:
Svyatoslav Scherbina
2022-10-07 13:48:39 +02:00
committed by Space Team
parent b6f950ed75
commit 28dea9d949
3 changed files with 2 additions and 44 deletions
@@ -153,9 +153,6 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
@Argument(value = "-Xemit-lazy-objc-header", description = "")
var emitLazyObjCHeader: String? = null
@Argument(value = "-Xenable", deprecatedName = "--enable", valueDescription = "<Phase>", description = "Enable backend phase")
var enablePhases: Array<String>? = null
@Argument(
value = "-Xexport-library",
valueDescription = "<path>",
@@ -233,18 +230,9 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
@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
@Argument(value = "-Xprint-ir", deprecatedName = "--print_ir", description = "Print IR")
var printIr: Boolean = false
@Argument(value = "-Xprint-ir-with-descriptors", deprecatedName = "--print_ir_with_descriptors", description = "Print IR with descriptors")
var printIrWithDescriptors: Boolean = false
@Argument(value = "-Xprint-locations", deprecatedName = "--print_locations", description = "Print locations")
var printLocations: Boolean = false
@Argument(value = "-Xprint-files", description = "Print files")
var printFiles: Boolean = false
@@ -209,9 +209,6 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
put(EXPORT_KDOC, arguments.exportKDoc)
put(PRINT_IR, arguments.printIr)
put(PRINT_IR_WITH_DESCRIPTORS, arguments.printIrWithDescriptors)
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)
@@ -223,12 +220,6 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
put(VERIFY_IR, arguments.verifyIr)
put(VERIFY_BITCODE, arguments.verifyBitCode)
put(ENABLED_PHASES,
arguments.enablePhases.toNonNullList())
put(DISABLED_PHASES,
arguments.disablePhases.toNonNullList())
put(LIST_PHASES, arguments.listPhases)
put(ENABLE_ASSERTIONS, arguments.enableAssertions)
val memoryModelFromArgument = when (arguments.memoryModel) {
@@ -20,24 +20,18 @@ class KonanConfigKeys {
= CompilerConfigurationKey.create("add debug information")
val FAKE_OVERRIDE_VALIDATOR: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("fake override validator")
val DISABLED_PHASES: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create("disable backend phases")
val BITCODE_EMBEDDING_MODE: CompilerConfigurationKey<BitcodeEmbedding.Mode>
= CompilerConfigurationKey.create("bitcode embedding mode")
val EMIT_LAZY_OBJC_HEADER_FILE: CompilerConfigurationKey<String?> =
CompilerConfigurationKey.create("output file to emit lazy Obj-C header")
val ENABLE_ASSERTIONS: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("enable runtime assertions in generated code")
val ENABLED_PHASES: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create("enable backend phases")
val ENTRY: CompilerConfigurationKey<String?>
= CompilerConfigurationKey.create("fully qualified main() name")
val EXPORTED_LIBRARIES: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create<List<String>>("libraries included into produced framework API")
val FULL_EXPORTED_NAME_PREFIX: CompilerConfigurationKey<String?>
= CompilerConfigurationKey.create("prefix used when exporting Kotlin names to other languages")
val LIBRARIES_TO_CACHE: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create<List<String>>("paths to libraries that to be compiled to cache")
val LIBRARY_TO_ADD_TO_CACHE: CompilerConfigurationKey<String?>
= CompilerConfigurationKey.create<String?>("path to library that to be added to cache")
val CACHE_DIRECTORIES: CompilerConfigurationKey<List<String>>
@@ -68,19 +62,13 @@ class KonanConfigKeys {
= CompilerConfigurationKey.create("generates debug trampolines to make debugger breakpoint resolution more accurate")
val LINKER_ARGS: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create("additional linker arguments")
val LIST_PHASES: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("list backend phases")
val LIST_TARGETS: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("list available targets")
val MANIFEST_FILE: CompilerConfigurationKey<String?>
= CompilerConfigurationKey.create("provide manifest addend file")
val META_INFO: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create("generate metadata")
val METADATA_KLIB: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("metadata klib")
val MODULE_KIND: CompilerConfigurationKey<ModuleKind>
= CompilerConfigurationKey.create("module kind")
val MODULE_NAME: CompilerConfigurationKey<String?>
val MODULE_NAME: CompilerConfigurationKey<String?>
= CompilerConfigurationKey.create("module name")
val NATIVE_LIBRARY_FILES: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create("native library file paths")
@@ -108,14 +96,8 @@ class KonanConfigKeys {
= 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>
val PRINT_IR: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("print ir")
val PRINT_IR_WITH_DESCRIPTORS: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("print ir with descriptors")
val PRINT_LOCATIONS: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("print locations")
val PRINT_FILES: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("print files")
val PRODUCE: CompilerConfigurationKey<CompilerOutputKind>
@@ -128,8 +110,6 @@ class KonanConfigKeys {
= CompilerConfigurationKey.create("override default runtime file path")
val INCLUDED_LIBRARIES: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey("klibs processed in the same manner as source files")
val SOURCE_MAP: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create("generate source map")
val SHORT_MODULE_NAME: CompilerConfigurationKey<String?>
= CompilerConfigurationKey("short module name for IDE and export")
val STATIC_FRAMEWORK: CompilerConfigurationKey<Boolean>
@@ -165,7 +145,6 @@ class KonanConfigKeys {
val DESTROY_RUNTIME_MODE: CompilerConfigurationKey<DestroyRuntimeMode>
= CompilerConfigurationKey.create("when to destroy runtime")
val GARBAGE_COLLECTOR: CompilerConfigurationKey<GC> = CompilerConfigurationKey.create("gc")
val CHECK_LLD_COMPATIBILITY: CompilerConfigurationKey<Boolean> = CompilerConfigurationKey.create("check compatibility with LLD")
val PROPERTY_LAZY_INITIALIZATION: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("lazy top level properties initialization")
val WORKER_EXCEPTION_HANDLING: CompilerConfigurationKey<WorkerExceptionHandling> = CompilerConfigurationKey.create("unhandled exception processing in Worker.executeAfter")