Make native tasks CC compatible

This allows running with CC&native:
./gradlew assemble
./gradlew :kotlin-native:bundle
./gradlew :native:native.tests:test

Required for KTI-1553
This commit is contained in:
cristiangarcia
2024-02-27 23:36:33 +01:00
committed by Space Team
parent 584d98cd72
commit 57edc413a3
10 changed files with 49 additions and 32 deletions
+3
View File
@@ -635,6 +635,8 @@ val stdlibTask = tasks.register<Copy>("nativeStdlib") {
from(stdlibBuildTask.map { it.outputs.files })
into(project.layout.buildDirectory.dir("nativeStdlib"))
val targetList = targetList
val kotlinVersion = kotlinVersion
eachFile {
if (name == "manifest") {
// Stdlib is a common library that doesn't depend on anything target-specific.
@@ -660,6 +662,7 @@ val cacheableTargetNames: List<String> by project
cacheableTargetNames.forEach { targetName ->
tasks.register("${targetName}StdlibCache", KonanCacheTask::class.java) {
notCompatibleWithConfigurationCache("project used in execution time")
target = targetName
originalKlib.fileProvider(stdlibTask.map { it.destinationDir })
klibUniqName = "stdlib"