Fix build wamrc for xtensa failure (#1109)

Fix build wamrc failure when using llvm xtensa version, and update
xtensa llvm version to 13.0.0.
This commit is contained in:
Wenyong Huang 2022-04-23 20:25:40 +08:00 committed by GitHub
parent adaaf348ed
commit 9b858c43cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View File

@ -208,7 +208,7 @@ def main():
},
"xtensa": {
"repo": "https://github.com/espressif/llvm-project.git",
"branch": "xtensa_release_11.0.0",
"branch": "xtensa_release_13.0.0",
},
"default": {
"repo": "https://github.com/llvm/llvm-project.git",

View File

@ -2670,7 +2670,7 @@ apply_func_passes(AOTCompContext *comp_ctx)
return true;
}
#if WASM_ENABLE_LLVM_LEGACY_PM != 0
#if WASM_ENABLE_LLVM_LEGACY_PM != 0 || LLVM_VERSION_MAJOR < 12
static bool
apply_lto_passes(AOTCompContext *comp_ctx)
{
@ -2709,7 +2709,7 @@ apply_lto_passes(AOTCompContext *comp_ctx)
LLVMPassManagerBuilderDispose(pass_mgr_builder);
return true;
}
#endif
#endif /* end of WASM_ENABLE_LLVM_LEGACY_PM != 0 || LLVM_VERSION_MAJOR < 12 */
/* Check whether the target supports hardware atomic instructions */
static bool
@ -2816,7 +2816,7 @@ aot_compile_wasm(AOTCompContext *comp_ctx)
}
}
else {
#if WASM_ENABLE_LLVM_LEGACY_PM == 0
#if WASM_ENABLE_LLVM_LEGACY_PM == 0 && LLVM_VERSION_MAJOR >= 12
/* Run llvm new pass manager for AOT compiler if llvm
legacy pass manager isn't used */
bh_print_time("Begin to run llvm optimization passes");

View File

@ -293,6 +293,8 @@ aot_check_simd_compatibility(const char *arch_c_str, const char *cpu_c_str)
#endif /* WASM_ENABLE_SIMD */
}
#if WASM_ENABLE_LAZY_JIT != 0
#if LLVM_VERSION_MAJOR < 12
LLVMOrcJITTargetMachineBuilderRef
LLVMOrcJITTargetMachineBuilderFromTargetMachine(LLVMTargetMachineRef TM);
@ -304,8 +306,6 @@ LLVMOrcJITTargetMachineBuilderCreateFromTargetMachine(LLVMTargetMachineRef TM)
}
#endif
#if WASM_ENABLE_LAZY_JIT != 0
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(LLJITBuilder, LLVMOrcLLJITBuilderRef)
void
@ -348,7 +348,7 @@ aot_lookup_orcjit_func(LLVMOrcLLJITRef orc_lazyjit, void *module_inst,
func_ptrs[func_idx] = (void *)func_addr;
return (void *)func_addr;
}
#endif
#endif /* end of WASM_ENABLE_LAZY_JIT != 0 */
void
aot_func_disable_tce(LLVMValueRef func)
@ -361,6 +361,7 @@ aot_func_disable_tce(LLVMValueRef func)
F->setAttributes(Attrs);
}
#if LLVM_VERSION_MAJOR >= 12
void
aot_apply_llvm_new_pass_manager(AOTCompContext *comp_ctx)
{
@ -478,3 +479,4 @@ aot_apply_llvm_new_pass_manager(AOTCompContext *comp_ctx)
}
#endif
}
#endif /* end of LLVM_VERSION_MAJOR >= 12 */