backend/build: add hack to workaround missing interop features
This commit is contained in:
committed by
SvyatoslavScherbina
parent
667d3b9356
commit
b531d984c8
@@ -0,0 +1,9 @@
|
|||||||
|
typedef int32_t LLVMAttributeSet;
|
||||||
|
|
||||||
|
// Return value type of LLVMGetFunctionAttr is enum LLVMAttribute;
|
||||||
|
// it is not a strict enum, but used as a set of enum values instead.
|
||||||
|
// Currently it is not possible to configure interop to treat a enum in such way,
|
||||||
|
// so redeclare the function with appropriate return value type:
|
||||||
|
static inline LLVMAttributeSet LLVMGetFunctionAttrSet(LLVMValueRef Fn) {
|
||||||
|
return LLVMGetFunctionAttr(Fn);
|
||||||
|
}
|
||||||
@@ -134,6 +134,7 @@ List<String> llvmLinkerOpts() {
|
|||||||
kotlinNativeInterop {
|
kotlinNativeInterop {
|
||||||
llvm {
|
llvm {
|
||||||
defFile 'llvm.def'
|
defFile 'llvm.def'
|
||||||
|
headers files('LlvmHacks.h')
|
||||||
compilerOpts "-fPIC", "-I$llvmDir/include"
|
compilerOpts "-fPIC", "-I$llvmDir/include"
|
||||||
linkerOpts llvmLinkerOpts()
|
linkerOpts llvmLinkerOpts()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user