Fixes to build libmono with disabled JIT. (#4421)
authorJohan Lorensson <lateralusx.github@gmail.com>
Thu, 2 Mar 2017 20:09:19 +0000 (21:09 +0100)
committerZoltan Varga <vargaz@gmail.com>
Thu, 2 Mar 2017 20:09:19 +0000 (15:09 -0500)
commit5134b17082e9fbfd2e90efb3c411a6c65a11649e
tree4b52d770d91487574cb51066209d7bd12fc89b05
parenta19175129f4f34c53a73e26d949cf89ade683a03
Fixes to build libmono with disabled JIT. (#4421)

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.
mono/mini/decompose.c
mono/mini/method-to-ir.c
mono/mini/mini.h
mono/mini/tramp-amd64.c
mono/mini/type-checking.c
msvc/mono.def
msvc/monosgen.def