fix build: (mac and linux)
common fix of build: add to link flags -LlibffiDir -lffi llvm.def: os specific remove from ldflags -lffi, it shoould appear after -LlibffiDir...
This commit is contained in:
@@ -39,7 +39,7 @@ kotlinNativeInterop {
|
|||||||
llvm {
|
llvm {
|
||||||
defFile 'llvm.def'
|
defFile 'llvm.def'
|
||||||
compilerOpts "-I$llvmDir/include"
|
compilerOpts "-I$llvmDir/include"
|
||||||
linkerOpts "-L$llvmDir/lib"
|
linkerOpts "-L$llvmDir/lib -L$libffiDir/lib -lffi"
|
||||||
}
|
}
|
||||||
|
|
||||||
hash { // TODO: copy-pasted from ':common:compileHash'
|
hash { // TODO: copy-pasted from ':common:compileHash'
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ linkerOpts.osx = \
|
|||||||
-lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation -lLLVMProfileData -lLLVMTransformUtils \
|
-lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation -lLLVMProfileData -lLLVMTransformUtils \
|
||||||
-lLLVMBitWriter -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser \
|
-lLLVMBitWriter -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser \
|
||||||
-lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMSupport \
|
-lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMSupport \
|
||||||
-lpthread -lz -lm -lcurses -lffi
|
-lpthread -lz -lm -lcurses
|
||||||
|
|
||||||
linkerOpts.linux=\
|
linkerOpts.linux=\
|
||||||
-Wl,--whole-archive \
|
-Wl,--whole-archive \
|
||||||
@@ -31,5 +31,5 @@ linkerOpts.linux=\
|
|||||||
-lLLVMBitWriter -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser \
|
-lLLVMBitWriter -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser \
|
||||||
-lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMSupport \
|
-lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMSupport \
|
||||||
-Wl,--no-whole-archive \
|
-Wl,--no-whole-archive \
|
||||||
-lrt -ldl -lpthread -lz -lm -lffi \
|
-lrt -ldl -lpthread -lz -lm \
|
||||||
-Wl,-z,noexecstack
|
-Wl,-z,noexecstack
|
||||||
|
|||||||
Reference in New Issue
Block a user