From cc2a35408ac000770b60dff13a80fac87cea088a Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Wed, 7 Dec 2016 00:16:00 +0300 Subject: [PATCH] Provided KONAN_HOME relative -Djava.library.path. Updated the README. Allow -output in addition to -o. --- README.md | 15 ++++++++------- cmd/konanc | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6b9f39961d4..f294a33039d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cmd/konanc b/cmd/konanc index ab2aae4b308..fc767748e7a 100755 --- a/cmd/konanc +++ b/cmd/konanc @@ -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[@]}")