Fix wamr compiler issues and refine some error messages (#470)
Fix potential memory leak issue when using llvm::EngineBuilder().selectTarget() Fix issue of accessing aot_value's fields after it is freed Fix JIT not print failed to link import warning Change some error messages: 'fail to' to 'failed to' Update error message when SIMD isn't enabled Fix install littlevgl wasm app of wasi version failed Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -115,9 +115,10 @@ aot_check_simd_compatibility(const char *arch_c_str, const char *cpu_c_str)
|
||||
|
||||
llvm::SmallVector<std::string, 1> targetAttributes;
|
||||
llvm::Triple targetTriple(arch_c_str, "", "");
|
||||
llvm::TargetMachine *targetMachine = llvm::EngineBuilder().selectTarget(
|
||||
targetTriple, "", std::string(cpu_c_str), targetAttributes);
|
||||
if (targetMachine == nullptr) {
|
||||
auto targetMachine =
|
||||
std::unique_ptr<llvm::TargetMachine>(llvm::EngineBuilder().selectTarget(
|
||||
targetTriple, "", std::string(cpu_c_str), targetAttributes));
|
||||
if (!targetMachine) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user