Files
kotlin-fork/runtime/build.gradle
T
Vasily Levchenko 27517b0db1 [codegen][debug] make runtime debug information friendly to generated one.
- inroduced function generation context containing mostly functionality local to function generation
- initial debug location is linked with basic block.
- then on each expression location is tuned.
- removed manual placement of debug location dictations over the place.

- refactoring removed unused declarations
2017-07-10 07:25:17 -07:00

55 lines
1.8 KiB
Groovy

/*
* Copyright 2010-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.jetbrains.kotlin.CompileCppToBitcode
// TODO: consider using some Gradle plugins to build and test
targetList.each { targetName ->
task("${targetName}Runtime", type: CompileCppToBitcode) {
name "runtime"
srcRoot file('src/main')
dependsOn ":common:${targetName}Hash"
dependsOn "${targetName}Launcher"
target targetName
compilerArgs targetArgs[targetName]
compilerArgs '-g'
compilerArgs '-I' + project.file('../common/src/hash/headers')
compilerArgs '-I' + project.file(rootProject.ext.get("${targetName}LibffiDir") + "/include")
linkerArgs project.file("../common/build/$targetName/hash.bc").path
}
}
targetList.each { targetName ->
task("${targetName}Launcher", type: CompileCppToBitcode) {
name "launcher"
srcRoot file('src/launcher')
target targetName
compilerArgs targetArgs[targetName]
compilerArgs '-g'
compilerArgs '-I' + project.file('../common/src/hash/headers')
compilerArgs '-I' + project.file('src/main/cpp')
}
}
task hostRuntime(dependsOn: "${rootProject.ext.host}Runtime")
task clean {
doLast {
delete buildDir
}
}