diff --git a/core/iwasm/compilation/aot_emit_aot_file.c b/core/iwasm/compilation/aot_emit_aot_file.c index ab82d632e..262be17f2 100644 --- a/core/iwasm/compilation/aot_emit_aot_file.c +++ b/core/iwasm/compilation/aot_emit_aot_file.c @@ -2693,6 +2693,7 @@ 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_)) /* Generate a temp file name */ int ret; char obj_file_name[64]; @@ -2720,6 +2721,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_)) */ } else if (!strncmp(LLVMGetTargetName(target), "arc", 3)) { #if defined(_WIN32) || defined(_WIN32_) diff --git a/core/iwasm/compilation/aot_llvm.c b/core/iwasm/compilation/aot_llvm.c index fd62d3964..f4449afd3 100644 --- a/core/iwasm/compilation/aot_llvm.c +++ b/core/iwasm/compilation/aot_llvm.c @@ -1663,6 +1663,10 @@ aot_create_comp_context(AOTCompData *comp_data, aot_comp_option_t option) /* verify external llc compiler */ comp_ctx->external_llc_compiler = getenv("WAMRC_LLC_COMPILER"); if (comp_ctx->external_llc_compiler) { +#if defined(_WIN32) || defined(_WIN32_) + comp_ctx->external_llc_compiler = NULL; + LOG_WARNING("External LLC compiler not supported on Windows."); +#else if (access(comp_ctx->external_llc_compiler, X_OK) != 0) { LOG_WARNING("WAMRC_LLC_COMPILER [%s] not found, fallback to " "default pipeline", @@ -1674,12 +1678,17 @@ aot_create_comp_context(AOTCompData *comp_data, aot_comp_option_t option) LOG_VERBOSE("Using external LLC compiler [%s]", comp_ctx->external_llc_compiler); } +#endif } /* verify external asm compiler */ if (!comp_ctx->external_llc_compiler) { comp_ctx->external_asm_compiler = getenv("WAMRC_ASM_COMPILER"); if (comp_ctx->external_asm_compiler) { +#if defined(_WIN32) || defined(_WIN32_) + comp_ctx->external_asm_compiler = NULL; + LOG_WARNING("External ASM compiler not supported on Windows."); +#else if (access(comp_ctx->external_asm_compiler, X_OK) != 0) { LOG_WARNING( "WAMRC_ASM_COMPILER [%s] not found, fallback to " @@ -1692,6 +1701,7 @@ aot_create_comp_context(AOTCompData *comp_data, aot_comp_option_t option) LOG_VERBOSE("Using external ASM compiler [%s]", comp_ctx->external_asm_compiler); } +#endif } }