[K/JS] Remove an internal system property and replace it with the new compiler flag

This commit is contained in:
Artem Kobzar
2023-03-17 12:38:34 +00:00
committed by Space Team
parent ca2492e1f8
commit 4da81b2b6e
164 changed files with 100 additions and 566 deletions
@@ -55,8 +55,7 @@ enum class CompilerSystemProperties(val property: String, val alwaysDirectAccess
USER_HOME("user.home", alwaysDirectAccess = true),
JAVA_VERSION("java.specification.version", alwaysDirectAccess = true),
JAVA_HOME("java.home", alwaysDirectAccess = true),
JAVA_CLASS_PATH("java.class.path", alwaysDirectAccess = true),
KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED("kotlin.js.compiler.legacy.force_enabled", alwaysDirectAccess = true)
JAVA_CLASS_PATH("java.class.path", alwaysDirectAccess = true)
;
private fun <T> getProperFunction(custom: T?, default: T): T {
@@ -590,20 +590,10 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
}
@Argument(
value = "-Xuse-deprecated-legacy-compiler",
description = "Use deprecated legacy compiler without error"
value = "-Xforce-deprecated-legacy-compiler-usage",
description = "The flag is used only for our inner infrastructure. It will be removed soon, so it's unsafe to use it nowadays."
)
var useDeprecatedLegacyCompiler = false
set(value) {
checkFrozen()
field = value
}
@Argument(
value = "-Xlegacy-deprecated-no-warn",
description = "Disable warnings of deprecation of legacy compiler"
)
var legacyDeprecatedNoWarn = false
var forceDeprecatedLegacyCompilerUsage = false
set(value) {
checkFrozen()
field = value
@@ -623,11 +613,6 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
collector.deprecationWarn(irBaseClassInMetadata, false, "-Xir-base-class-in-metadata")
collector.deprecationWarn(irNewIr2Js, true, "-Xir-new-ir2js")
if (languageVersion >= LanguageVersion.KOTLIN_1_9 && CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value != "true") {
collector.deprecationWarn(legacyDeprecatedNoWarn, false, "-Xlegacy-deprecated-no-warn")
collector.deprecationWarn(useDeprecatedLegacyCompiler, false, "-Xuse-deprecated-legacy-compiler")
}
return super.configureAnalysisFlags(collector, languageVersion).also {
it[allowFullyQualifiedNameInKClass] = wasm && wasmKClassFqn //Only enabled WASM BE supports this flag
}