backend.native and generated dependencies resolving
This commit is contained in:
@@ -16,18 +16,23 @@ apply plugin: org.jetbrains.kotlin.NativeInteropPlugin
|
|||||||
|
|
||||||
ext.deps = files("$kotlin_ir_path/kotlinc/lib/kotlin-compiler.jar",
|
ext.deps = files("$kotlin_ir_path/kotlinc/lib/kotlin-compiler.jar",
|
||||||
"$kotlin_ir_path/kotlinc/lib/kotlin-runtime.jar",
|
"$kotlin_ir_path/kotlinc/lib/kotlin-runtime.jar",
|
||||||
"$kotlin_ir_path/kotlinc/lib/kotlin-reflect.jar")
|
"$kotlin_ir_path/kotlinc/lib/kotlin-reflect.jar",
|
||||||
|
"${project(':Interop:Runtime').buildDir}/classes/main")
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
llvm {
|
||||||
|
kotlin.srcDirs += 'build/nativeInteropStubs/kotlin'
|
||||||
|
compileClasspath = deps
|
||||||
|
}
|
||||||
compiler {
|
compiler {
|
||||||
java.srcDirs += 'compiler/ir/backend.native/src/'
|
java.srcDirs += 'compiler/ir/backend.native/src/'
|
||||||
kotlin.srcDirs += 'compiler/ir/backend.native/src/'
|
kotlin.srcDirs += 'compiler/ir/backend.native/src/'
|
||||||
compileClasspath = deps
|
compileClasspath = deps.plus(llvm.output)
|
||||||
}
|
}
|
||||||
cli_bc {
|
cli_bc {
|
||||||
java.srcDirs += 'cli.bc/src'
|
java.srcDirs += 'cli.bc/src'
|
||||||
kotlin.srcDirs += 'cli.bc/src'
|
kotlin.srcDirs += 'cli.bc/src'
|
||||||
compileClasspath = deps
|
compileClasspath = deps.plus(compiler.output)
|
||||||
}
|
}
|
||||||
bc_frontend {
|
bc_frontend {
|
||||||
java.srcDirs += 'bc.frontend/src'
|
java.srcDirs += 'bc.frontend/src'
|
||||||
@@ -36,17 +41,21 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compilerClasses.dependsOn 'llvmClasses'
|
||||||
|
build.dependsOn 'compilerClasses','cli_bcClasses','bc_frontendClasses'
|
||||||
|
compilerClasses.dependsOn 'genInteropStubs'
|
||||||
|
|
||||||
def runtime = []
|
def runtime = []
|
||||||
|
|
||||||
task run(type: JavaExec) {
|
task run(type: JavaExec) {
|
||||||
main 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
main 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
||||||
project.sourceSets.each{runtime.add(it.output.classesDir)}
|
project.sourceSets.each{runtime.add(it.output.classesDir)}
|
||||||
deps.each{runtime.add(it)}
|
deps.each{runtime.add(it)}
|
||||||
println(runtime)
|
|
||||||
classpath = files(runtime)
|
classpath = files(runtime)
|
||||||
args '../experiments/translator/src/test/kotlin/tests/classfields_1/classfields_1.kt'
|
args '../experiments/translator/src/test/kotlin/tests/classfields_1/classfields_1.kt'
|
||||||
args '-output', "$buildDir/out.bc"
|
args '-output', "$buildDir/out.bc"
|
||||||
|
|
||||||
|
dependsOn ':backend.native:build'
|
||||||
dependsOn ':runtime:build'
|
dependsOn ':runtime:build'
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
|
|||||||
Reference in New Issue
Block a user