return 1;
}
#else
- if (acfg->aot_opts.llvm_only || mono_aot_mode_is_full (&acfg->aot_opts) || mono_aot_mode_is_hybrid (&acfg->aot_opts))
+ if (acfg->aot_opts.llvm_only) {
+ if (!mono_aot_mode_is_interp (&acfg->aot_opts))
+ acfg->jit_opts |= MONO_OPT_GSHAREDVT;
+ } else if (mono_aot_mode_is_full (&acfg->aot_opts) || mono_aot_mode_is_hybrid (&acfg->aot_opts))
acfg->jit_opts |= MONO_OPT_GSHAREDVT;
#endif
/* Common case */
method_index = mono_metadata_token_index (method->token) - 1;
- guint32 num_methods = amodule->info.nmethods - amodule->info.nextra_methods;
- if (method_index >= num_methods)
- /* method not available in AOT image */
- return NULL;
+ if (!mono_llvm_only) {
+ guint32 num_methods = amodule->info.nmethods - amodule->info.nextra_methods;
+ if (method_index >= num_methods)
+ /* method not available in AOT image */
+ return NULL;
+ }
}
code = (guint8 *)load_method (domain, amodule, m_class_get_image (klass), method, method->token, method_index, error);
mini_llvmonly_load_method (MonoMethod *method, gboolean caller_gsharedvt, gboolean need_unbox, gpointer *out_arg, MonoError *error)
{
gpointer addr = mono_compile_method_checked (method, error);
- return_val_if_nok (error, NULL);
+
+ if (!is_ok (error)) {
+ mono_error_cleanup (error);
+ error_init_reuse (error);
+ }
if (addr) {
return mini_llvmonly_add_method_wrappers (method, (gpointer)addr, caller_gsharedvt, need_unbox, out_arg);