Use clang codegen for android, linux, mingw.
This commit is contained in:
committed by
Sergey Bogolepov
parent
a85b474fd0
commit
970f2a98f9
@@ -35,7 +35,7 @@ model {
|
||||
} else if (isWindows()) {
|
||||
cppCompiler.args "-DKONAN_WINDOWS=1"
|
||||
} else if (isLinux()) {
|
||||
cppCompiler.args "-DKONAN_LINUX=1"
|
||||
cppCompiler.args "-DKONAN_LINUX=1", "-D_GLIBCXX_USE_CXX11_ABI=0"
|
||||
} else {
|
||||
throw new Error("Unsupported host OS.")
|
||||
}
|
||||
|
||||
@@ -224,9 +224,9 @@ void LLVMAddInstrProfPass(LLVMPassManagerRef passManagerRef, const char* outputF
|
||||
passManager->add(createInstrProfilingLegacyPass(options));
|
||||
}
|
||||
|
||||
LLVMTargetLibraryInfoRef LLVMGetTargetLibraryInfo(LLVMModuleRef moduleRef) {
|
||||
auto* libraryInfo = new TargetLibraryInfoImpl(Triple(unwrap(moduleRef)->getTargetTriple()));
|
||||
return llvm::wrap(libraryInfo);
|
||||
void LLVMKotlinAddTargetLibraryInfoWrapperPass(LLVMPassManagerRef passManagerRef, const char* targetTriple) {
|
||||
legacy::PassManagerBase *passManager = unwrap(passManagerRef);
|
||||
passManager->add(new TargetLibraryInfoWrapperPass(Triple(targetTriple)));
|
||||
}
|
||||
|
||||
void LLVMKotlinInitializeTargets() {
|
||||
@@ -241,7 +241,14 @@ void LLVMKotlinInitializeTargets() {
|
||||
INIT_LLVM_TARGET(X86)
|
||||
INIT_LLVM_TARGET(WebAssembly)
|
||||
#elif KONAN_LINUX
|
||||
INIT_LLVM_TARGET(AArch64)
|
||||
INIT_LLVM_TARGET(ARM)
|
||||
INIT_LLVM_TARGET(Mips)
|
||||
INIT_LLVM_TARGET(X86)
|
||||
#elif KONAN_WINDOWS
|
||||
INIT_LLVM_TARGET(AArch64)
|
||||
INIT_LLVM_TARGET(ARM)
|
||||
INIT_LLVM_TARGET(X86)
|
||||
#endif
|
||||
|
||||
#undef INIT_LLVM_TARGET
|
||||
|
||||
@@ -72,7 +72,7 @@ LLVMValueRef LLVMCreatePGOFunctionNameVar(LLVMValueRef llvmFunction, const char
|
||||
|
||||
void LLVMAddInstrProfPass(LLVMPassManagerRef passManagerRef, const char* outputFileName);
|
||||
|
||||
LLVMTargetLibraryInfoRef LLVMGetTargetLibraryInfo(LLVMModuleRef moduleRef);
|
||||
void LLVMKotlinAddTargetLibraryInfoWrapperPass(LLVMPassManagerRef passManagerRef, const char* targetTriple);
|
||||
|
||||
void LLVMKotlinInitializeTargets();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user