[Native] Don't use KLIB repositories in K/N build infra
Don't pass KLIB repositories via '-repo' or '-r' compiler parameters. ^KT-61098
This commit is contained in:
committed by
Space Team
parent
4f1f06c24f
commit
c13c917a8a
-19
@@ -30,18 +30,6 @@ open class KonanLibrariesSpec(
|
||||
val artifactFiles: List<File>
|
||||
@InputFiles @PathSensitive(PathSensitivity.RELATIVE) get() = artifacts.map { it.artifact }
|
||||
|
||||
@Internal val explicitRepos = mutableSetOf<File>()
|
||||
|
||||
val repos: Set<File>
|
||||
@Input get() = mutableSetOf<File>().apply {
|
||||
addAll(explicitRepos)
|
||||
add(task.destinationDir) // TODO: Check if task is a library - create a Library interface
|
||||
add(task.destinationDir) // TODO: Check if task is a library - create a Library interface
|
||||
add(task.project.konanLibsBaseDir.targetSubdir(target))
|
||||
addAll(artifacts.flatMap { it.libraries.repos })
|
||||
addAll(task.platformConfiguration.files.map { it.parentFile })
|
||||
}
|
||||
|
||||
val target: KonanTarget
|
||||
@Internal get() = task.konanTarget
|
||||
|
||||
@@ -118,13 +106,6 @@ open class KonanLibrariesSpec(
|
||||
it is KonanInteropLibrary
|
||||
}
|
||||
|
||||
/** Add repo for library search */
|
||||
fun useRepo(directory: Any) = explicitRepos.add(project.file(directory))
|
||||
/** Add repos for library search */
|
||||
fun useRepos(vararg directories: Any) = directories.forEach { useRepo(it) }
|
||||
/** Add repos for library search */
|
||||
fun useRepos(directories: Iterable<Any>) = directories.forEach { useRepo(it) }
|
||||
|
||||
private fun Project.evaluationDependsOn(another: Project) {
|
||||
if (this != another) { evaluationDependsOn(another.path) }
|
||||
}
|
||||
|
||||
-2
@@ -175,8 +175,6 @@ abstract class KonanCompileTask: KonanBuildingTask(), KonanCompileSpec {
|
||||
|
||||
/** Args passed to the compiler at both stages of the two-stage compilation and during the singe-stage compilation. */
|
||||
protected open fun buildCommonArgs() = mutableListOf<String>().apply {
|
||||
addArgs("-repo", libraries.repos.map { it.canonicalPath })
|
||||
|
||||
if (platformConfiguration.files.isNotEmpty()) {
|
||||
platformConfiguration.files.filter { it.name.endsWith(".klib") }.forEach {
|
||||
// The library's directory is added in libraries.repos.
|
||||
|
||||
-2
@@ -98,8 +98,6 @@ open class KonanInteropTask @Inject constructor(@Internal val workerExecutor: Wo
|
||||
addArgs("-compiler-option", includeDirs.allHeadersDirs.map { "-I${it.absolutePath}" })
|
||||
addArgs("-headerFilterAdditionalSearchPrefix", includeDirs.headerFilterDirs.map { it.absolutePath })
|
||||
|
||||
addArgs("-repo", libraries.repos.map { it.canonicalPath })
|
||||
|
||||
addFileArgs("-library", libraries.klibFiles)
|
||||
addArgs("-library", libraries.artifacts.map { it.artifact.canonicalPath })
|
||||
|
||||
|
||||
@@ -25,6 +25,5 @@ swiftBenchmark {
|
||||
|
||||
tasks.named<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile>("compileKotlinNative") {
|
||||
dependsOn(gradle.includedBuild("benchmarksAnalyzer").task(":cinteropLibcurlMacos"))
|
||||
kotlinOptions.freeCompilerArgs = listOf("-repo", project.file("$toolsPath/benchmarksAnalyzer/build/classes/kotlin/macos/main").absolutePath,
|
||||
"-l", "benchmarksAnalyzer-cinterop-libcurl")
|
||||
kotlinOptions.freeCompilerArgs = listOf("-l", project.file("$toolsPath/benchmarksAnalyzer/build/classes/kotlin/macos/main/benchmarksAnalyzer-cinterop-libcurl").absolutePath)
|
||||
}
|
||||
Reference in New Issue
Block a user