@@ -2416,6 +2416,7 @@ aot_handle_llvm_errmsg(const char *string, LLVMErrorRef err)
24162416 LLVMDisposeErrorMessage (err_msg );
24172417}
24182418
2419+ #if WAMR_BUILD_JIT != 0
24192420static bool
24202421create_target_machine_detect_host (AOTCompContext * comp_ctx )
24212422{
@@ -2599,6 +2600,7 @@ orc_jit_create(AOTCompContext *comp_ctx)
25992600 LLVMOrcDisposeLLLazyJIT (orc_jit );
26002601 return ret ;
26012602}
2603+ #endif /* WAMR_BUILD_JIT != 0*/
26022604
26032605bool
26042606aot_compiler_init (void )
@@ -2809,6 +2811,7 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option)
28092811 comp_ctx -> custom_sections_wp = option -> custom_sections ;
28102812 comp_ctx -> custom_sections_count = option -> custom_sections_count ;
28112813
2814+ #if WASM_ENABLE_JIT != 0
28122815 if (option -> is_jit_mode ) {
28132816 comp_ctx -> is_jit_mode = true;
28142817
@@ -2840,7 +2843,9 @@ aot_create_comp_context(const AOTCompData *comp_data, aot_comp_option_t option)
28402843 if (!orc_jit_create (comp_ctx ))
28412844 goto fail ;
28422845 }
2843- else {
2846+ else
2847+ #endif /*WASM_ENABLE_JIT != 0*/
2848+ {
28442849 /* Create LLVM target machine */
28452850 if (!option -> target_arch || !strstr (option -> target_arch , "-" )) {
28462851 /* Retrieve the target triple based on user input */
@@ -3484,9 +3489,11 @@ aot_destroy_comp_context(AOTCompContext *comp_ctx)
34843489 /* Note: don't dispose comp_ctx->context and comp_ctx->module as
34853490 they are disposed when disposing the thread safe context */
34863491
3492+ #if WAMR_BUILD_JIT != 0
34873493 /* Has to be the last one */
34883494 if (comp_ctx -> orc_jit )
34893495 LLVMOrcDisposeLLLazyJIT (comp_ctx -> orc_jit );
3496+ #endif
34903497
34913498 if (comp_ctx -> func_ctxes )
34923499 aot_destroy_func_contexts (comp_ctx , comp_ctx -> func_ctxes ,
0 commit comments