Collected or scattered means of running the compiler in a shell script.

So one can now

$ ./gradlew dist

$ ./dist/bin/konanc backend.native/tests/runtime/basic/hello0.kt -o hello

$ ./hello

or one can

$ ./gradlew demo

and have a complete dist build,
with a test program compiled and executed automatically after that
This commit is contained in:
Alexander Gorshenev
2016-12-06 13:54:42 +03:00
committed by alexander-gorshenev
parent 527efa661b
commit c84fe7fd85
6 changed files with 255 additions and 13 deletions
+17 -8
View File
@@ -223,17 +223,26 @@ task run(type: JavaExec) {
environment 'LD_LIBRARY_PATH' : "${llvmDir}/lib:${project.buildDir}/nativelibs"
}
task jars(type: Jar) {
from 'build/classes/cli_bc',
'build/classes/compiler',
'build/classes/hashInteropStubs',
'build/classes/llvmInteropStubs'
task jars {
doFirst {
project.buildscript.configurations.classpath.each {
String jarName = it.getName();
print jarName + ":"
}
}
dependsOn 'build', ':runtime:build', 'external_jars'
}
task external_jars(type: Copy) {
from configurations.compilerCompile {
include 'protobuf-java-3.0.0.jar'
include 'kotlin-compiler*.jar'
rename 'kotlin-compiler(.*).jar', 'kotlin-compiler.jar'
into 'build/external_jars'
}
}
protobuf {
protoc {