Interop: do not use hardcoded paths to LLVM
also use the defined LLVM toolchain to build JNI interop stub libs
This commit is contained in:
@@ -42,3 +42,8 @@ sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
genInteropStubs {
|
||||
environment 'CPATH' : "$llvmInstallPath/include"
|
||||
environment 'LIBRARY_PATH' : "$llvmInstallPath/lib"
|
||||
}
|
||||
|
||||
|
||||
@@ -3,27 +3,27 @@ libName = llvmbridge
|
||||
headers = llvm-c/Core.h llvm-c/ExecutionEngine.h llvm-c/Target.h llvm-c/Analysis.h llvm-c/BitWriter.h
|
||||
|
||||
|
||||
compiler = cc
|
||||
compiler = clang
|
||||
|
||||
compilerOpts = -std=c99 -I/opt/local/libexec/llvm-3.8/include -fPIC \
|
||||
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 = c++
|
||||
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 \
|
||||
-L/opt/local/libexec/llvm-3.8/lib -Wl,-search_paths_first -Wl,-headerpad_max_install_names \
|
||||
-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 \
|
||||
-L/opt/local/lib -lffi
|
||||
-lffi
|
||||
|
||||
excludedFunctions =
|
||||
|
||||
Reference in New Issue
Block a user