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
+2
View File
@@ -187,6 +187,7 @@ class LinkKonanTest extends KonanTest {
jvmArgs "-ea"
args "-output", outPath,
"-runtime", "${runtimeBc.absolutePath}",
"-library", "${stdlibKtBc.absolutePath}",
"-library", "${libBc.absolutePath}",
"${sourceKt.absolutePath}"
@@ -445,6 +446,7 @@ task intrinsic(type: UnitKonanTest) {
}
task link(type: LinkKonanTest) {
goldValue = "0\n"
source = "link/src/bar.kt"
lib = "link/lib"
}
+4 -3
View File
@@ -1,5 +1,6 @@
package qwerty
import qwerty.*
fun bar(a: Int): Int {
return foo(foo2(a))
fun main(args: Array<String>) {
val size = foo(foo2(args.size))
println(size.toString())
}