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 {
|
||||
defFile 'llvm.def'
|
||||
compilerOpts "-I$llvmDir/include"
|
||||
linkerOpts "-L$llvmDir/lib"
|
||||
linkerOpts "-L$llvmDir/lib -L$libffiDir/lib -lffi"
|
||||
}
|
||||
|
||||
hash { // TODO: copy-pasted from ':common:compileHash'
|
||||
|
||||
@@ -21,7 +21,7 @@ linkerOpts.osx = \
|
||||
-lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMInstrumentation -lLLVMProfileData -lLLVMTransformUtils \
|
||||
-lLLVMBitWriter -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser \
|
||||
-lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMSupport \
|
||||
-lpthread -lz -lm -lcurses -lffi
|
||||
-lpthread -lz -lm -lcurses
|
||||
|
||||
linkerOpts.linux=\
|
||||
-Wl,--whole-archive \
|
||||
@@ -31,5 +31,5 @@ linkerOpts.linux=\
|
||||
-lLLVMBitWriter -lLLVMExecutionEngine -lLLVMTarget -lLLVMAnalysis -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser \
|
||||
-lLLVMBitReader -lLLVMMC -lLLVMCore -lLLVMSupport \
|
||||
-Wl,--no-whole-archive \
|
||||
-lrt -ldl -lpthread -lz -lm -lffi \
|
||||
-lrt -ldl -lpthread -lz -lm \
|
||||
-Wl,-z,noexecstack
|
||||
|
||||
Reference in New Issue
Block a user