backend: Use konan.dependencies property to set dependencies dir
This patch set default dependencies directory to ${konan.home}/
dependencies and allows one to override this setting using
konan.dependencies system property.
This commit is contained in:
@@ -194,6 +194,7 @@ targetList.each { target ->
|
||||
classpath = project.configurations.cli_bc
|
||||
jvmArgs "-ea",
|
||||
"-Dkonan.home=${project.parent.file('dist')}",
|
||||
"-Dkonan.dependencies=${project.parent.file('dependencies/all')}",
|
||||
"-Djava.library.path=${project.buildDir}/nativelibs"
|
||||
args('-output', project(':runtime').file("build/${target}/stdlib.kt.bc"),
|
||||
'-nolink', '-nostdlib', '-ea',
|
||||
@@ -220,6 +221,7 @@ targetList.each { target ->
|
||||
classpath = project.configurations.cli_bc
|
||||
jvmArgs "-ea",
|
||||
"-Dkonan.home=${project.parent.file('dist')}",
|
||||
"-Dkonan.dependencies=${project.parent.file('dependencies/all')}",
|
||||
"-Djava.library.path=${project.buildDir}/nativelibs"
|
||||
args('-output', project(':runtime').file("build/${target}/start.kt.bc"),
|
||||
'-nolink', '-nostdlib', '-ea',
|
||||
|
||||
+3
-4
@@ -2,9 +2,8 @@ package org.jetbrains.kotlin.backend.konan
|
||||
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import java.io.File
|
||||
import java.util.Properties
|
||||
|
||||
public class Distribution(val config: CompilerConfiguration) {
|
||||
class Distribution(val config: CompilerConfiguration) {
|
||||
|
||||
val targetManager = TargetManager(config)
|
||||
val target =
|
||||
@@ -25,8 +24,8 @@ public class Distribution(val config: CompilerConfiguration) {
|
||||
|
||||
val lib = "$konanHome/lib/$target"
|
||||
|
||||
// TODO: Pack all needed things to dist.
|
||||
val dependencies = "$konanHome/../dependencies/all"
|
||||
// We can override dependency directory using konan.dependencies system property.
|
||||
val dependencies = System.getProperty("konan.dependencies", "$konanHome/dependencies")
|
||||
|
||||
val stdlib = "$lib/stdlib.kt.bc"
|
||||
val start = "$lib/start.kt.bc"
|
||||
|
||||
Reference in New Issue
Block a user