[Gradle] Use -Xmetadata-klib CLI arg to produce metadate KLIBs
The `-Xexpect-actual-linker` CLI argument is deprecated and replaced by `-Xmetadata-klib` CLI argument. ^KT-61136
This commit is contained in:
committed by
Space Team
parent
4d80e0f08d
commit
620c9434ca
-1
@@ -459,7 +459,6 @@ internal constructor(
|
|||||||
args.enableAssertions = debuggable
|
args.enableAssertions = debuggable
|
||||||
args.target = konanTarget.name
|
args.target = konanTarget.name
|
||||||
args.produce = outputKind.name.toLowerCaseAsciiOnly()
|
args.produce = outputKind.name.toLowerCaseAsciiOnly()
|
||||||
args.expectActualLinker = sharedCompilationData != null
|
|
||||||
args.metadataKlib = sharedCompilationData != null
|
args.metadataKlib = sharedCompilationData != null
|
||||||
args.nodefaultlibs = sharedCompilationData != null
|
args.nodefaultlibs = sharedCompilationData != null
|
||||||
args.manifestFile = sharedCompilationData?.manifestFile?.absolutePath
|
args.manifestFile = sharedCompilationData?.manifestFile?.absolutePath
|
||||||
|
|||||||
+2
-3
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.compilerRunner.OutputItemsCollectorImpl
|
|||||||
import org.jetbrains.kotlin.gradle.dsl.*
|
import org.jetbrains.kotlin.gradle.dsl.*
|
||||||
import org.jetbrains.kotlin.gradle.internal.tasks.allOutputFiles
|
import org.jetbrains.kotlin.gradle.internal.tasks.allOutputFiles
|
||||||
import org.jetbrains.kotlin.gradle.logging.GradleErrorMessageCollector
|
import org.jetbrains.kotlin.gradle.logging.GradleErrorMessageCollector
|
||||||
import org.jetbrains.kotlin.gradle.logging.GradleKotlinLogger
|
|
||||||
import org.jetbrains.kotlin.gradle.logging.GradlePrintingMessageCollector
|
import org.jetbrains.kotlin.gradle.logging.GradlePrintingMessageCollector
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.create
|
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilerArgumentsProducer.CreateCompilerArgumentsContext.Companion.create
|
||||||
@@ -87,7 +86,7 @@ abstract class KotlinCompileCommon @Inject constructor(
|
|||||||
args.reportPerf = true
|
args.reportPerf = true
|
||||||
}
|
}
|
||||||
|
|
||||||
args.expectActualLinker = expectActualLinker.get()
|
args.metadataKlib = produceMetadataKlib.get()
|
||||||
|
|
||||||
args.destination = destinationDirectory.get().asFile.normalize().absolutePath
|
args.destination = destinationDirectory.get().asFile.normalize().absolutePath
|
||||||
|
|
||||||
@@ -128,7 +127,7 @@ abstract class KotlinCompileCommon @Inject constructor(
|
|||||||
internal val refinesMetadataPaths: ConfigurableFileCollection = objectFactory.fileCollection()
|
internal val refinesMetadataPaths: ConfigurableFileCollection = objectFactory.fileCollection()
|
||||||
|
|
||||||
@get:Internal
|
@get:Internal
|
||||||
internal val expectActualLinker = objectFactory.property(Boolean::class.java)
|
internal val produceMetadataKlib = objectFactory.property(Boolean::class.java)
|
||||||
|
|
||||||
override fun callCompilerAsync(
|
override fun callCompilerAsync(
|
||||||
args: K2MetadataCompilerArguments,
|
args: K2MetadataCompilerArguments,
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ internal class KotlinCompileCommonConfig(
|
|||||||
) : AbstractKotlinCompileConfig<KotlinCompileCommon>(compilationInfo) {
|
) : AbstractKotlinCompileConfig<KotlinCompileCommon>(compilationInfo) {
|
||||||
init {
|
init {
|
||||||
configureTask { task ->
|
configureTask { task ->
|
||||||
task.expectActualLinker.value(
|
task.produceMetadataKlib.value(
|
||||||
providers.provider {
|
providers.provider {
|
||||||
(compilationInfo.origin as? KotlinCommonCompilation)?.isKlibCompilation == true
|
(compilationInfo.origin as? KotlinCommonCompilation)?.isKlibCompilation == true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user