Current mono build on (at least Windows) fails if build with disabled JIT
since the .def file used when building libmono, mono-2.0-sgen.dll, exports
a couple of symbols missing when DISABLE_JIT is defined.
Turns out that these methods have been incorrectly exported and should not
be part of the public API surface. This commit removes MONO_API for the
methods incorrectly marked:
mono_emit_native_call
mono_inst_name
mono_replace_ins
It also removes them from the .def files so they won't be exported in the
mono runtime DLL on Windows.
For mono_set_break_policy an empty stub will be added since it is considered
being a public API.
The above support is primarily used on none desktop Windows platforms
when building mono runtime module without JIT support.
This commit also fix a problem introduced in tramp-amd64.c by commit
https://github.com/mono/mono/commit/
4281399ba4b7c44a30fa2c2a314a470260bb3eb1
causing it to get duplicated definitions of mono_arch_get_enter_icall_trampoline
when DISABLE_JIT has been defined.
#ifndef DISABLE_JIT
-/* FIXME: This conflicts with the definition in mini.c, so it cannot be moved to mini.h */
-MONO_API MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
void mini_emit_stobj (MonoCompile *cfg, MonoInst *dest, MonoInst *src, MonoClass *klass, gboolean native);
void mini_emit_initobj (MonoCompile *cfg, MonoInst *dest, const guchar *ip, MonoClass *klass);
#include <config.h>
#include <mono/utils/mono-compiler.h>
+#include "mini.h"
#ifndef DISABLE_JIT
#endif
#include <mono/utils/memcheck.h>
-#include "mini.h"
#include <mono/metadata/abi-details.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/attrdefs.h>
int mono_op_to_op_imm (int opcode);
int mono_op_to_op_imm_noemul (int opcode);
-MONO_API MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
-
static int inline_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **sp,
guchar *ip, guint real_offset, gboolean inline_always);
static MonoInst*
#else /* !DISABLE_JIT */
-MONO_EMPTY_SOURCE_FILE (method_to_ir);
+void
+mono_set_break_policy (MonoBreakPolicyFunc policy_callback)
+{
+}
#endif /* !DISABLE_JIT */
MONO_API void mono_print_method_from_ip (void *ip);
MONO_API char *mono_pmip (void *ip);
gboolean mono_debug_count (void);
-MONO_API const char* mono_inst_name (int op);
+MONO_LLVM_INTERNAL const char* mono_inst_name (int op);
int mono_op_to_op_imm (int opcode);
int mono_op_imm_to_op (int opcode);
int mono_load_membase_to_load_mem (int opcode);
MonoInst* mono_emit_jit_icall_by_info (MonoCompile *cfg, int il_offset, MonoJitICallInfo *info, MonoInst **args);
MonoInst* mono_emit_method_call (MonoCompile *cfg, MonoMethod *method, MonoInst **args, MonoInst *this_ins);
void mono_create_helper_signatures (void);
+MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
gboolean mini_class_is_system_array (MonoClass *klass);
MonoMethodSignature *mono_get_element_address_signature (int arity);
void mono_add_ins_to_end (MonoBasicBlock *bb, MonoInst *inst);
gpointer mono_create_ftnptr (MonoDomain *domain, gpointer addr);
-MONO_API void mono_replace_ins (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, MonoInst **prev, MonoBasicBlock *first_bb, MonoBasicBlock *last_bb);
+void mono_replace_ins (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst *ins, MonoInst **prev, MonoBasicBlock *first_bb, MonoBasicBlock *last_bb);
int mono_find_method_opcode (MonoMethod *method);
MonoJitICallInfo *mono_register_jit_icall (gconstpointer func, const char *name, MonoMethodSignature *sig, gboolean is_save);
return buf;
}
-#endif /* !DISABLE_JIT */
/*
* mono_arch_get_enter_icall_trampoline:
return NULL;
#endif /* ENABLE_INTERPRETER */
}
+#endif /* !DISABLE_JIT */
#ifdef DISABLE_JIT
gpointer
mini_emit_class_check_inst (cfg, klass_reg, klass, NULL);
}
+#else
+
+MONO_EMPTY_SOURCE_FILE (type_checking);
#endif
mono_domain_try_type_resolve
mono_domain_try_unload
mono_domain_unload
-mono_emit_native_call
mono_environment_exitcode_get
mono_environment_exitcode_set
mono_error_cleanup
mono_init
mono_init_from_assembly
mono_init_version
-mono_inst_name
mono_install_assembly_load_hook
mono_install_assembly_postload_refonly_search_hook
mono_install_assembly_postload_search_hook
mono_register_config_for_assembly
mono_register_machine_config
mono_register_symfile_for_assembly
-mono_replace_ins
mono_runtime_class_init
mono_runtime_cleanup
mono_runtime_delegate_invoke
mono_domain_try_type_resolve
mono_domain_try_unload
mono_domain_unload
-mono_emit_native_call
mono_environment_exitcode_get
mono_environment_exitcode_set
mono_error_cleanup
mono_init
mono_init_from_assembly
mono_init_version
-mono_inst_name
mono_install_assembly_load_hook
mono_install_assembly_postload_refonly_search_hook
mono_install_assembly_postload_search_hook
mono_register_config_for_assembly
mono_register_machine_config
mono_register_symfile_for_assembly
-mono_replace_ins
mono_runtime_class_init
mono_runtime_cleanup
mono_runtime_delegate_invoke