backend/build: add hack to workaround missing interop features

This commit is contained in:
Svyatoslav Scherbina
2016-12-29 16:10:39 +07:00
committed by SvyatoslavScherbina
parent 667d3b9356
commit b531d984c8
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -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);
}
+1
View File
@@ -134,6 +134,7 @@ List<String> llvmLinkerOpts() {
kotlinNativeInterop {
llvm {
defFile 'llvm.def'
headers files('LlvmHacks.h')
compilerOpts "-fPIC", "-I$llvmDir/include"
linkerOpts llvmLinkerOpts()
}