Made -Xfake-override-validator off by default

Deprected -Xdisable-fake-override-validator

(cherry picked from commit 0abe4e46c497645b07e9e55088135813bd1a7437)
This commit is contained in:
Alexander Gorshenev
2020-11-14 03:31:07 +03:00
committed by Stanislav Erokhin
parent 10a1ea9091
commit 07db1de4da
4 changed files with 8 additions and 5 deletions
@@ -248,7 +248,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
parseShortModuleName(arguments, configuration, outputKind)?.let { parseShortModuleName(arguments, configuration, outputKind)?.let {
put(SHORT_MODULE_NAME, it) put(SHORT_MODULE_NAME, it)
} }
put(DISABLE_FAKE_OVERRIDE_VALIDATOR, arguments.disableFakeOverrideValidator) put(FAKE_OVERRIDE_VALIDATOR, arguments.fakeOverrideValidator)
putIfNotNull(PRE_LINK_CACHES, parsePreLinkCachesValue(configuration, arguments.preLinkCaches)) putIfNotNull(PRE_LINK_CACHES, parsePreLinkCachesValue(configuration, arguments.preLinkCaches))
putIfNotNull(OVERRIDE_KONAN_PROPERTIES, parseOverrideKonanProperties(arguments, configuration)) putIfNotNull(OVERRIDE_KONAN_PROPERTIES, parseOverrideKonanProperties(arguments, configuration))
put(DESTROY_RUNTIME_MODE, when (arguments.destroyRuntimeMode) { put(DESTROY_RUNTIME_MODE, when (arguments.destroyRuntimeMode) {
@@ -142,9 +142,12 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
) )
var exportedLibraries: Array<String>? = null var exportedLibraries: Array<String>? = null
@Argument(value="-Xdisable-fake-override-validator", description = "Disable IR fake override validator") @Argument(value="-Xdisable-fake-override-validator", description = "This option is deprecated")
var disableFakeOverrideValidator: Boolean = false var disableFakeOverrideValidator: Boolean = false
@Argument(value="-Xfake-override-validator", description = "Enable IR fake override validator")
var fakeOverrideValidator: Boolean = false
@Argument( @Argument(
value = "-Xframework-import-header", value = "-Xframework-import-header",
valueDescription = "<header>", valueDescription = "<header>",
@@ -16,8 +16,8 @@ class KonanConfigKeys {
= CompilerConfigurationKey.create("check dependencies and download the missing ones") = CompilerConfigurationKey.create("check dependencies and download the missing ones")
val DEBUG: CompilerConfigurationKey<Boolean> val DEBUG: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("add debug information") = CompilerConfigurationKey.create("add debug information")
val DISABLE_FAKE_OVERRIDE_VALIDATOR: CompilerConfigurationKey<Boolean> val FAKE_OVERRIDE_VALIDATOR: CompilerConfigurationKey<Boolean>
= CompilerConfigurationKey.create("disable fake override validator") = CompilerConfigurationKey.create("fake override validator")
val DISABLED_PHASES: CompilerConfigurationKey<List<String>> val DISABLED_PHASES: CompilerConfigurationKey<List<String>>
= CompilerConfigurationKey.create("disable backend phases") = CompilerConfigurationKey.create("disable backend phases")
val BITCODE_EMBEDDING_MODE: CompilerConfigurationKey<BitcodeEmbedding.Mode> val BITCODE_EMBEDDING_MODE: CompilerConfigurationKey<BitcodeEmbedding.Mode>
@@ -175,7 +175,7 @@ internal fun Context.psiToIr(
val modules = if (isProducingLibrary) emptyMap() else (irDeserializer as KonanIrLinker).modules val modules = if (isProducingLibrary) emptyMap() else (irDeserializer as KonanIrLinker).modules
if (!config.configuration.getBoolean(KonanConfigKeys.DISABLE_FAKE_OVERRIDE_VALIDATOR)) { if (config.configuration.getBoolean(KonanConfigKeys.FAKE_OVERRIDE_VALIDATOR)) {
val fakeOverrideChecker = FakeOverrideChecker(KonanManglerIr, KonanManglerDesc) val fakeOverrideChecker = FakeOverrideChecker(KonanManglerIr, KonanManglerDesc)
modules.values.forEach { fakeOverrideChecker.check(it) } modules.values.forEach { fakeOverrideChecker.check(it) }
} }