Added "start" function between the C launcher and Kotlin "main"

This commit is contained in:
Alexander Gorshenev
2016-12-01 15:11:42 +03:00
committed by alexander-gorshenev
parent 1aa7b23853
commit 22d748001d
4 changed files with 46 additions and 4 deletions
+21 -1
View File
@@ -162,7 +162,6 @@ dependencies {
build.dependsOn 'compilerClasses','cli_bcClasses','bc_frontendClasses'
task stdlib(type: JavaExec) {
main 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
classpath configurations.cli_bc
@@ -182,6 +181,27 @@ task stdlib(type: JavaExec) {
environment 'LD_LIBRARY_PATH' : "${llvmDir}/lib:${project.buildDir}/nativelibs"
}
task start(type: JavaExec) {
main 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
classpath configurations.cli_bc
args project(':runtime').file('src/launcher/kotlin')
args '-library', project(':runtime').file('build/stdlib.kt.bc')
args '-output', project(':runtime').file('build/start.kt.bc')
jvmArgs '-ea', "-Djava.library.path=${project.buildDir}/nativelibs"
dependsOn 'stdlib'
outputs.file(project(':runtime').file('build/start.kt.bc'))
doFirst {
args '-runtime', project(':runtime').build.outputs.files.singleFile
}
environment 'LD_LIBRARY_PATH' : "${llvmDir}/lib:${project.buildDir}/nativelibs"
}
task run(type: JavaExec) {
main 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
classpath configurations.cli_bc