backend.native: apply Interop and add LLVM bindings
This commit is contained in:
@@ -12,6 +12,7 @@ buildscript {
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: org.jetbrains.kotlin.NativeInteropPlugin
|
||||
|
||||
|
||||
dependencies {
|
||||
@@ -74,3 +75,11 @@ task jars {
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
genInteropStubs {
|
||||
environment 'CPATH' : "$llvmInstallPath/include"
|
||||
environment 'LIBRARY_PATH' : "$llvmInstallPath/lib"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
libName = llvmbridge
|
||||
|
||||
headers = llvm-c/Core.h llvm-c/ExecutionEngine.h llvm-c/Target.h llvm-c/Analysis.h llvm-c/BitWriter.h llvm-c/BitReader.h
|
||||
|
||||
|
||||
compiler = clang
|
||||
|
||||
compilerOpts = -std=c99 -fPIC \
|
||||
-Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers \
|
||||
-pedantic -Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor \
|
||||
-DNDEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
|
||||
|
||||
|
||||
linker = clang++
|
||||
|
||||
linkerOpts = -stdlib=libc++ -fPIC -fvisibility-inlines-hidden \
|
||||
-Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers \
|
||||
-pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor \
|
||||
-std=c++11 \
|
||||
-DNDEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS \
|
||||
-Wl,-search_paths_first -Wl,-headerpad_max_install_names \
|
||||
-lLLVMX86Disassembler -lLLVMX86AsmParser -lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter \
|
||||
-lLLVMX86Desc -lLLVMMCDisassembler -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMInterpreter \
|
||||
-lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation -lLLVMProfileData -lLLVMTransformUtils \
|
||||
-lLLVMBitWriter -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser \
|
||||
-lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMSupport -lcurses -lpthread -lz -lm \
|
||||
-lffi
|
||||
|
||||
excludedFunctions =
|
||||
Reference in New Issue
Block a user