KT-63544: Fix Gradle CC problem in KotlinJsIrLink
This commit is contained in:
committed by
Space Team
parent
31256e259e
commit
1dbb227de2
+6
-8
@@ -15,7 +15,7 @@ import org.jetbrains.kotlin.gradle.targets.js.npm.NpmProject
|
||||
import org.jetbrains.kotlin.gradle.targets.js.npm.npmProject
|
||||
|
||||
internal open class KotlinJsIrLinkConfig(
|
||||
private val binary: JsIrBinary
|
||||
private val binary: JsIrBinary,
|
||||
) : BaseKotlin2JsCompileConfig<KotlinJsIrLink>(KotlinCompilationInfo(binary.compilation)) {
|
||||
|
||||
private val compilation
|
||||
@@ -29,10 +29,8 @@ internal open class KotlinJsIrLinkConfig(
|
||||
task.dependsOn(compilation.compileTaskProvider)
|
||||
task.dependsOn(compilation.output.classesDirs)
|
||||
task.entryModule.fileProvider(
|
||||
compilation.output.classesDirs.elements.flatMap {
|
||||
task.project.providers.provider {
|
||||
it.single().asFile
|
||||
}
|
||||
task.project.providers.provider {
|
||||
compilation.output.classesDirs.elements.get().single().asFile
|
||||
}
|
||||
).disallowChanges()
|
||||
task.rootCacheDirectory.set(project.layout.buildDirectory.map { it.dir("klib/cache/js/${binary.name}") })
|
||||
@@ -50,7 +48,7 @@ internal open class KotlinJsIrLinkConfig(
|
||||
|
||||
override fun configureAdditionalFreeCompilerArguments(
|
||||
task: KotlinJsIrLink,
|
||||
compilation: KotlinCompilationInfo
|
||||
compilation: KotlinCompilationInfo,
|
||||
) {
|
||||
task.enhancedFreeCompilerArgs.value(
|
||||
task.compilerOptions.freeCompilerArgs.zip(task.modeProperty) { freeArgs, mode ->
|
||||
@@ -89,7 +87,7 @@ internal open class KotlinJsIrLinkConfig(
|
||||
|
||||
private fun MutableList<String>.configureOptions(
|
||||
compilation: KotlinCompilationInfo,
|
||||
vararg additionalCompilerArgs: String
|
||||
vararg additionalCompilerArgs: String,
|
||||
) {
|
||||
additionalCompilerArgs.forEach { arg ->
|
||||
if (none { it.startsWith(arg) }) add(arg)
|
||||
@@ -102,4 +100,4 @@ internal open class KotlinJsIrLinkConfig(
|
||||
add("$WASM_TARGET=$targetValue")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user