From ce5094e5865778c87b46fb391bb40fa3589b9b59 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Wed, 9 Mar 2022 19:11:07 +0300 Subject: [PATCH] [K/N][build] Don't rewrite same stdlib parts during copy --- kotlin-native/build.gradle | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kotlin-native/build.gradle b/kotlin-native/build.gradle index 2f2baeedf08..d9679d0e999 100644 --- a/kotlin-native/build.gradle +++ b/kotlin-native/build.gradle @@ -417,7 +417,14 @@ targetList.each { target -> destinationDir project.file("$distDir/$stdlib") from(project(':kotlin-native:runtime').file("build/${target}Stdlib")) { - include('**') + if (target == hostName) { + include('**') + } else { + // We don't want to rewrite stdlib parts as they are the same and may be already used + // by the other build phases like caching or endorsed libraries. + include('*/targets/**') + include('*/manifest') + } eachFile { if (name == 'manifest') { def existingManifest = file("$destinationDir/$path")