tools: Add dependecy download helpers
This patch adds 2 helpers to download dependencies for compiler and stub generator during their execution. They take list of external dependencies as a parameter and directory where they must be located. Helpers check if these dependencies exist in the given directory and download not existing ones.
This commit is contained in:
+2
-2
@@ -40,7 +40,6 @@ findHome() {
|
||||
KONAN_HOME="$(findHome)"
|
||||
|
||||
NATIVE_LIB="${KONAN_HOME}/konan/nativelib"
|
||||
DEPENDENCIES="${KONAN_HOME}/../dependencies/all"
|
||||
JAVA_OPTS="-ea \
|
||||
-Djava.library.path=${NATIVE_LIB} \
|
||||
-Dkonan.home=${KONAN_HOME}"
|
||||
@@ -49,7 +48,8 @@ STUB_GENERATOR_JAR="${KONAN_HOME}/konan/lib/StubGenerator.jar"
|
||||
KOTLIN_JAR="${KONAN_HOME}/konan/lib/kotlin-compiler.jar"
|
||||
INTEROP_INDEXER_JAR="${KONAN_HOME}/konan/lib/Indexer.jar"
|
||||
INTEROP_RUNTIME_JAR="${KONAN_HOME}/konan/lib/Runtime.jar"
|
||||
INTEROP_CLASSPATH="$STUB_GENERATOR_JAR:$KOTLIN_JAR:$INTEROP_INDEXER_JAR:$INTEROP_RUNTIME_JAR"
|
||||
HELPERS_JAR="${KONAN_HOME}/konan/lib/helpers.jar"
|
||||
INTEROP_CLASSPATH="$STUB_GENERATOR_JAR:$KOTLIN_JAR:$INTEROP_INDEXER_JAR:$INTEROP_RUNTIME_JAR:$HELPERS_JAR"
|
||||
INTEROP_TOOL=org.jetbrains.kotlin.native.interop.gen.jvm.MainKt
|
||||
|
||||
FLAVOR_ARG=-flavor:native
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$JAVACMD" -a -n "$JAVA_HOME" -a -x "$JAVA_HOME/bin/java" ]; then
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
@@ -52,8 +52,9 @@ KONAN_HOME="$(findHome)"
|
||||
KONAN_JAR="${KONAN_HOME}/konan/lib/backend.native.jar"
|
||||
KOTLIN_JAR="${KONAN_HOME}/konan/lib/kotlin-compiler.jar"
|
||||
INTEROP_JAR="${KONAN_HOME}/konan/lib/Runtime.jar"
|
||||
HELPERS_JAR="${KONAN_HOME}/konan/lib/helpers.jar"
|
||||
NATIVE_LIB="${KONAN_HOME}/konan/nativelib"
|
||||
KONAN_CLASSPATH="$KOTLIN_JAR:$INTEROP_JAR:$KONAN_JAR"
|
||||
KONAN_CLASSPATH="$KOTLIN_JAR:$INTEROP_JAR:$KONAN_JAR:$HELPERS_JAR"
|
||||
KONAN_COMPILER=org.jetbrains.kotlin.cli.bc.K2NativeKt
|
||||
JAVA_OPTS=-ea
|
||||
|
||||
|
||||
Reference in New Issue
Block a user