diff --git a/core/iwasm/compilation/aot_emit_aot_file.c b/core/iwasm/compilation/aot_emit_aot_file.c index 262be17f2..2a46ff9be 100644 --- a/core/iwasm/compilation/aot_emit_aot_file.c +++ b/core/iwasm/compilation/aot_emit_aot_file.c @@ -2693,7 +2693,10 @@ aot_obj_data_create(AOTCompContext *comp_ctx) bh_print_time("Begin to emit object file"); if (comp_ctx->external_llc_compiler || comp_ctx->external_asm_compiler) { -#if !(defined(_WIN32) || defined(_WIN32_)) +#if defined(_WIN32) || defined(_WIN32_) + aot_set_last_error("external toolchain not supported on Windows"); + goto fail; +#else /* Generate a temp file name */ int ret; char obj_file_name[64]; @@ -2721,7 +2724,7 @@ aot_obj_data_create(AOTCompContext *comp_ctx) aot_set_last_error("create mem buffer with file failed."); goto fail; } -#endif /* end of !(defined(_WIN32) || defined(_WIN32_)) */ +#endif /* end of defined(_WIN32) || defined(_WIN32_) */ } else if (!strncmp(LLVMGetTargetName(target), "arc", 3)) { #if defined(_WIN32) || defined(_WIN32_)