[KLIB] Deprecate -Xexpect-actual-linker CLI argument
This argument has been finally superseded by `-Xmetadata-klib`. ^KT-61136
This commit is contained in:
committed by
Space Team
parent
620c9434ca
commit
78a962f6d2
@@ -28,7 +28,6 @@ fun CompilerConfiguration.setupCommonArguments(
|
||||
|
||||
put(CommonConfigurationKeys.DISABLE_INLINE, arguments.noInline)
|
||||
put(CommonConfigurationKeys.USE_FIR_EXTENDED_CHECKERS, arguments.useFirExtendedCheckers)
|
||||
put(CommonConfigurationKeys.EXPECT_ACTUAL_LINKER, arguments.expectActualLinker)
|
||||
put(CommonConfigurationKeys.METADATA_KLIB, arguments.metadataKlib)
|
||||
putIfNotNull(CLIConfigurationKeys.INTELLIJ_PLUGIN_ROOT, arguments.intellijPluginRoot)
|
||||
put(CommonConfigurationKeys.REPORT_OUTPUT_FILES, arguments.reportOutputFiles)
|
||||
|
||||
@@ -101,8 +101,7 @@ class K2MetadataCompiler : CLICompiler<K2MetadataCompilerArguments>() {
|
||||
val environment =
|
||||
KotlinCoreEnvironment.createForProduction(rootDisposable, configuration, EnvironmentConfigFiles.METADATA_CONFIG_FILES)
|
||||
|
||||
// TODO (KT-61136): drop `expectActualLinker` later, after the appropriate changes in the Gradle plugin
|
||||
val mode = if (arguments.expectActualLinker || arguments.metadataKlib) "KLib" else "metadata"
|
||||
val mode = if (arguments.metadataKlib) "KLib" else "metadata"
|
||||
|
||||
val sourceFiles = environment.getSourceFiles()
|
||||
performanceManager.notifyCompilerInitialized(sourceFiles.size, environment.countLinesOfCode(sourceFiles), "$mode mode for $moduleName module")
|
||||
@@ -121,8 +120,7 @@ class K2MetadataCompiler : CLICompiler<K2MetadataCompilerArguments>() {
|
||||
val useFir = configuration.getBoolean(CommonConfigurationKeys.USE_FIR)
|
||||
val metadataSerializer = when {
|
||||
useFir -> FirMetadataSerializer(configuration, environment)
|
||||
// TODO (KT-61136): drop `expectActualLinker` later, after the appropriate changes in the Gradle plugin
|
||||
arguments.expectActualLinker || arguments.metadataKlib -> K2MetadataKlibSerializer(configuration, environment)
|
||||
arguments.metadataKlib -> K2MetadataKlibSerializer(configuration, environment)
|
||||
else -> MetadataSerializer(configuration, environment, dependOnOldBuiltIns = true)
|
||||
}
|
||||
metadataSerializer.analyzeAndSerialize()
|
||||
|
||||
Reference in New Issue
Block a user