Provided KONAN_HOME relative -Djava.library.path.

Updated the README.

Allow -output in addition to -o.
This commit is contained in:
Alexander Gorshenev
2016-12-07 00:16:00 +03:00
committed by alexander-gorshenev
parent 4dba5fdec4
commit cc2a35408a
2 changed files with 10 additions and 9 deletions
+8 -7
View File
@@ -1,16 +1,17 @@
# Kotlin-native backend #
## Build
Download dependencies:
gradle :dependencies:update
./gradlew dependencies:update
To run native translator just use:
Then build the compiler
gradle :backend.native:run
./gradlew dist
After that you should be able to compile your programs like that:
./dist/bin/konanc hello.kt -o hello
And it will run simple example (currently prints out IR of test file).
For more tests, use:
gradle :backend.native:tests:run
./gradlew backend.native:tests:run
+2 -2
View File
@@ -34,7 +34,7 @@ while [ $# -gt 0 ]; do
NOSTDLIB=YES
shift
;;
-o)
-o|-output)
OUTPUT_NAME=$2
shift
shift
@@ -87,7 +87,7 @@ STDLIB="$KONAN_HOME/lib/stdlib.kt.bc"
# KONAN BACKEND INVOCATION
#
java_args=("${java_args[@]}" "-noverify")
java_args=("${java_args[@]} -noverify -Djava.library.path=${KONAN_HOME}/konan/nativelib")
konan_args=("-runtime" $RUNTIME "${konan_args[@]}")
[ -z $NOSTDLIB ] && konan_args=("-library" $STDLIB "${konan_args[@]}")