Download dependencies only in dist

Don't extract dependencies in dependencies/all, only in dist/dependencies
Remove konan.dependencies property
This commit is contained in:
Ilya Matveev
2017-03-29 15:47:29 +07:00
committed by ilmat192
parent 7f4740130e
commit a906bd0d07
9 changed files with 10 additions and 45 deletions
@@ -250,8 +250,7 @@ private fun processLib(konanHome: String,
// TODO: We can provide a set of flags to find the components in the absence of 'dist' or 'dist/dependencies'.
val llvmHome = konanProperties.getOsSpecific("llvmHome")!!
// We can override dependency directory using konan.dependencies system property.
val dependencies = System.getProperty("konan.dependencies", "$konanHome/dependencies")
val dependencies = "$konanHome/dependencies"
val llvmInstallPath = "$dependencies/$llvmHome"
val additionalHeaders = args["-h"].orEmpty()
val additionalCompilerOpts = args["-copt"].orEmpty()
-2
View File
@@ -194,7 +194,6 @@ 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',
@@ -221,7 +220,6 @@ 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',
@@ -24,8 +24,7 @@ class Distribution(val config: CompilerConfiguration) {
val lib = "$konanHome/lib/$target"
// We can override dependency directory using konan.dependencies system property.
val dependenciesDir = System.getProperty("konan.dependencies", "$konanHome/dependencies")
val dependenciesDir = "$konanHome/dependencies"
val dependencies = properties.propertyList("dependencies.$suffix")
val stdlib = "$lib/stdlib.kt.bc"
+6 -1
View File
@@ -1,3 +1,6 @@
import com.sun.tools.doclets.internal.toolkit.util.Util
import groovy.io.FileType
//ant.importBuild 'backend.native/kotlin-ir/build.xml'
defaultTasks 'clean', 'demo'
@@ -284,7 +287,9 @@ task demo(type: Exec) {
task clean {
doLast {
delete 'dist'
file('dist').traverse(type: FileType.ANY, excludeNameFilter: "dependencies", maxDepth: 0) {
delete it
}
delete bundle.outputs.files
}
}
@@ -59,7 +59,6 @@ abstract class KonanTest extends JavaExec {
void setJvmArgs(Iterable<?> arguments) {
super.setJvmArgs(arguments +
"-Dkonan.home=${dist.canonicalPath}" +
"-Dkonan.dependencies=${dependenciesDir.canonicalPath}" +
"-Djava.library.path=${dist.canonicalPath}/konan/nativelib")
}
@@ -173,7 +173,6 @@ class NamedNativeInteropConfig implements Named {
new File(project.findProject(":Interop:Runtime").buildDir, "nativelibs")
).asPath
systemProperties "konan.home": project.rootProject.file("dist")
systemProperties "konan.dependencies": project.findProject(":dependencies").file("all")
environment "LIBCLANG_DISABLE_CRASH_RECOVERY": "1"
environment "DYLD_LIBRARY_PATH": "${project.llvmDir}/lib"
environment "LD_LIBRARY_PATH": "${project.llvmDir}/lib"
+2 -2
View File
@@ -30,7 +30,7 @@ abstract class NativeDep extends DefaultTask {
}
protected File getBaseOutDir() {
final File res = project.file("all")
final File res = project.rootProject.file("dist/dependencies")
res.mkdirs()
return res
}
@@ -132,7 +132,7 @@ if (isLinux()) {
}
task update {
task update(type: Copy) {
dependsOn tasks.withType(NativeDep)
}
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
findScriptHome() {
local source="${BASH_SOURCE[0]}"
while [ -h "$source" ] ; do
local linked="$(readlink "$source")"
local dir="$(cd -P $(dirname "$source") && cd -P $(dirname "$linked") && pwd)"
source="$dir/$(basename "$linked")"
done
(cd -P "$(dirname "$source")" && pwd)
}
SCRIPT_HOME="$(findScriptHome)"
PATH="$SCRIPT_HOME/../dist/bin:$PATH"
interop -Dkonan.dependencies="$SCRIPT_HOME/../dependencies/all" "$@"
-16
View File
@@ -1,16 +0,0 @@
#!/usr/bin/env bash
findScriptHome() {
local source="${BASH_SOURCE[0]}"
while [ -h "$source" ] ; do
local linked="$(readlink "$source")"
local dir="$(cd -P $(dirname "$source") && cd -P $(dirname "$linked") && pwd)"
source="$dir/$(basename "$linked")"
done
(cd -P "$(dirname "$source")" && pwd)
}
SCRIPT_HOME="$(findScriptHome)"
PATH="$SCRIPT_HOME/../dist/bin:$PATH"
konanc -Dkonan.dependencies="$SCRIPT_HOME/../dependencies/all" "$@"