Move ignoreConstOptimizationErrors compiler key from jvm to common
#KT-56023
This commit is contained in:
+10
@@ -753,6 +753,16 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
field = value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xignore-const-optimization-errors",
|
||||
description = "Ignore all compilation exceptions while optimizing some constant expressions."
|
||||
)
|
||||
var ignoreConstOptimizationErrors = false
|
||||
set(value) {
|
||||
checkFrozen()
|
||||
field = value
|
||||
}
|
||||
|
||||
@OptIn(IDEAPluginsCompatibilityAPI::class)
|
||||
open fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
|
||||
return HashMap<AnalysisFlag<*>, Any>().apply {
|
||||
|
||||
-10
@@ -820,16 +820,6 @@ Also sets `-jvm-target` value equal to the selected JDK version"""
|
||||
field = value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xignore-const-optimization-errors",
|
||||
description = "Ignore all compilation exceptions while optimizing some constant expressions."
|
||||
)
|
||||
var ignoreConstOptimizationErrors = false
|
||||
set(value) {
|
||||
checkFrozen()
|
||||
field = value
|
||||
}
|
||||
|
||||
@Argument(
|
||||
value = "-Xno-new-java-annotation-targets",
|
||||
description = "Do not generate Java 1.8+ targets for Kotlin annotation classes"
|
||||
|
||||
@@ -30,6 +30,7 @@ fun <A : CommonCompilerArguments> CompilerConfiguration.setupCommonArguments(
|
||||
put(CommonConfigurationKeys.REPORT_OUTPUT_FILES, arguments.reportOutputFiles)
|
||||
put(CommonConfigurationKeys.INCREMENTAL_COMPILATION, incrementalCompilationIsEnabled(arguments))
|
||||
put(CommonConfigurationKeys.ALLOW_ANY_SCRIPTS_IN_SOURCE_ROOTS, arguments.allowAnyScriptsInSourceRoots)
|
||||
put(CommonConfigurationKeys.IGNORE_CONST_OPTIMIZATION_ERRORS, arguments.ignoreConstOptimizationErrors)
|
||||
|
||||
val metadataVersionString = arguments.metadataVersion
|
||||
if (metadataVersionString != null) {
|
||||
|
||||
@@ -305,7 +305,6 @@ fun CompilerConfiguration.configureAdvancedJvmOptions(arguments: K2JVMCompilerAr
|
||||
put(JVMConfigurationKeys.LINK_VIA_SIGNATURES, arguments.linkViaSignatures)
|
||||
|
||||
put(JVMConfigurationKeys.ENABLE_DEBUG_MODE, arguments.enableDebugMode)
|
||||
put(JVMConfigurationKeys.IGNORE_CONST_OPTIMIZATION_ERRORS, arguments.ignoreConstOptimizationErrors)
|
||||
put(JVMConfigurationKeys.NO_NEW_JAVA_ANNOTATION_TARGETS, arguments.noNewJavaAnnotationTargets)
|
||||
put(JVMConfigurationKeys.OLD_INNER_CLASSES_LOGIC, arguments.oldInnerClassesLogic)
|
||||
put(JVMConfigurationKeys.ENABLE_IR_INLINER, arguments.enableIrInliner)
|
||||
|
||||
Reference in New Issue
Block a user