JVM IR: output stable ABI binaries by default
#KT-43592 Fixed
This commit is contained in:
+2
-2
@@ -182,10 +182,10 @@ class AnalyzerWithCompilerReport(
|
||||
)
|
||||
}
|
||||
|
||||
if (diagnostics.any { it.factory == Errors.IR_COMPILED_CLASS }) {
|
||||
if (diagnostics.any { it.factory == Errors.IR_WITH_UNSTABLE_ABI_COMPILED_CLASS }) {
|
||||
messageCollector.report(
|
||||
ERROR,
|
||||
"Classes compiled by a new Kotlin compiler backend were found in dependencies. " +
|
||||
"Classes compiled by an unstable version of the Kotlin compiler were found in dependencies. " +
|
||||
"Remove them from the classpath or use '-Xallow-unstable-dependencies' to suppress errors"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -165,7 +165,8 @@ fun CompilerConfiguration.configureAdvancedJvmOptions(arguments: K2JVMCompilerAr
|
||||
|
||||
put(JVMConfigurationKeys.PARAMETERS_METADATA, arguments.javaParameters)
|
||||
|
||||
put(JVMConfigurationKeys.IR, (arguments.useIR && !arguments.noUseIR) || arguments.useFir)
|
||||
val useIR = (arguments.useIR && !arguments.noUseIR) || arguments.useFir
|
||||
put(JVMConfigurationKeys.IR, useIR)
|
||||
|
||||
val abiStability = JvmAbiStability.fromStringOrNull(arguments.abiStability)
|
||||
if (arguments.abiStability != null) {
|
||||
@@ -174,6 +175,8 @@ fun CompilerConfiguration.configureAdvancedJvmOptions(arguments: K2JVMCompilerAr
|
||||
ERROR,
|
||||
"Unknown ABI stability mode: ${arguments.abiStability}, supported modes: ${JvmAbiStability.values().map { it.description }}"
|
||||
)
|
||||
} else if (!useIR && abiStability == JvmAbiStability.UNSTABLE) {
|
||||
messageCollector.report(ERROR, "-Xabi-stability=unstable is not supported in the old JVM backend")
|
||||
} else {
|
||||
put(JVMConfigurationKeys.ABI_STABILITY, abiStability)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user