Enable AOT usage on M1 mac (#2618)
This commit is contained in:
@ -3232,10 +3232,13 @@ aot_load_from_aot_file(const uint8 *buf, uint32 size, char *error_buf,
|
||||
if (!module)
|
||||
return NULL;
|
||||
|
||||
os_thread_jit_write_protect_np(false); /* Make memory writable */
|
||||
if (!load(buf, size, module, error_buf, error_buf_size)) {
|
||||
aot_unload(module);
|
||||
return NULL;
|
||||
}
|
||||
os_thread_jit_write_protect_np(true); /* Make memory executable */
|
||||
os_icache_flush(module->code, module->code_size);
|
||||
|
||||
LOG_VERBOSE("Load module success.\n");
|
||||
return module;
|
||||
|
||||
@ -53,7 +53,12 @@ get_target_symbol_map(uint32 *sym_num)
|
||||
return target_sym_map;
|
||||
}
|
||||
|
||||
#if (defined(__APPLE__) || defined(__MACH__)) && defined(__arm64__)
|
||||
#define BUILD_TARGET_AARCH64_DEFAULT "arm64"
|
||||
#else
|
||||
#define BUILD_TARGET_AARCH64_DEFAULT "aarch64v8"
|
||||
#endif
|
||||
|
||||
void
|
||||
get_current_target(char *target_buf, uint32 target_buf_size)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user