

dependencies {
    compile project(':tools:gcc-bridge:runtime')
    compile libraries.guava
    compile libraries.asm
    compile 'com.fasterxml.jackson.core:jackson-databind:2.8.11.1'
    compile('org.soot-oss:soot:4.2.1') {
        exclude group: 'org.smali', module: 'dexlib2'
    }
    implementation libraries.airline
}

task compilePlugin(type: Exec) {

    def sourceFile = 'src/main/resources/org/renjin/gcc/plugin.c'
    def gcc = 'gcc-4.7'

    inputs.file sourceFile
    outputs.file gccBridgePlugin

    commandLine 'sh', '-c', "${gcc} -shared -xc++ -I `${gcc} -print-file-name=plugin`/include -fPIC -fno-rtti -O2 ${sourceFile} -lstdc++ -shared-libgcc -o ${gccBridgePlugin}"

}