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:
committed by
alexander-gorshenev
parent
527efa661b
commit
c84fe7fd85
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user