diff options
author | Bernhard Urban <bernhard.urban@xamarin.com> | 2018-03-09 22:19:04 +0300 |
---|---|---|
committer | Ludovic Henry <luhenry@microsoft.com> | 2018-03-09 22:19:04 +0300 |
commit | 868a402137d8d91d31387fb2df7c72f2174f4d1f (patch) | |
tree | 5669428f52cbf87c97acb899c7e238598360515a /msvc | |
parent | 826f15a509add59182517aad629efc75b7db56a1 (diff) |
[metadata] split IL generation code into seperate compilation units. (#7487)
* [metadata] split IL generation code into seperate compilation units.
* [metadata] move ENABLE_ILGEN definition to configure
* [metadata] split IL generation code into seperate compilation units.
By adding callbacks for IL generating runtime code, we can link in code
later into the runtime that does such for configurations which do not
need IL generation initially. This is the case if you configure the
runtime with `--enable-minimal=jit,interpreter`.
In such configuration, the build will produce an additional library,
called `libmono-ilgen`.
An embedded can choose to link this library to the final binary and
initialize IL generation with the following three, newly added, API
calls:
* `void mono_marshal_ilgen_init (void)`
* `void mono_method_builder_ilgen_init (void)`
* `void mono_sgen_mono_ilgen_init (void)`
This change is mostly moving code around, but there are minor changes
like introducing the enum `MarshalTypeCheckPositions`, so we avoid
copy/paste constants accross compilation units.
* [windows] add IL gen files to windows build and set ENABLE_ILGEN
* [fixup!] fix windows build
* [fixup!] resolve merge conflicts with class getter commits
* marshal.c: b8da9736209427ef49267923e1321c801c65dfd2
* sgen-mono.c: 8ba4947f7a3b37b3c5e5458834109fad317f91bc
at some point I gave up to resolve merge conflicts and worked through
errors/warnings by compiling with
> `CFLAGS=-DENABLE_CHECKED_BUILD_PRIVATE_TYPES=1`
so the result is likely a bit different
* redo lost changes from 57f3f34e60ee6d17fb1dada4b8799f3d753ca2b0
* redo lost changes from 52514effbf19992edc323ff9d7bf21766bc50b2c
* [fixup!] fix array marshal
* [method-builder] use eglib types
review comment by Ludovic,
https://github.com/mono/mono/pull/7375#discussion_r171876337
* [marshal] remove stelem strings from header
review comment by Rodrigo,
https://github.com/mono/mono/pull/7375#discussion_r171921029
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/libmonoruntime-common.targets | 9 | ||||
-rw-r--r-- | msvc/libmonoruntime-common.targets.filters | 27 |
2 files changed, 36 insertions, 0 deletions
diff --git a/msvc/libmonoruntime-common.targets b/msvc/libmonoruntime-common.targets index 6b70563dfed..5d26f2ef210 100644 --- a/msvc/libmonoruntime-common.targets +++ b/msvc/libmonoruntime-common.targets @@ -59,6 +59,8 @@ <ClInclude Include="$(MonoSourceLocation)\mono\metadata\lock-tracer.h" /> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\marshal.c" /> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\marshal.h" /> + <ClCompile Include="$(MonoSourceLocation)\mono\metadata\marshal-ilgen.c" /> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\marshal-ilgen.h" /> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\marshal-internals.h" /> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\mempool.c" /> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\mempool.h" /> @@ -67,7 +69,11 @@ <ClCompile Include="$(MonoSourceLocation)\mono\metadata\metadata-verify.c" /> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\metadata-internals.h" /> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder.h" /> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder-internals.h" /> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\method-builder.c" /> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder-ilgen.h" /> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder-ilgen-internals.h" /> + <ClCompile Include="$(MonoSourceLocation)\mono\metadata\method-builder-ilgen.c" /> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\mono-basic-block.c" /> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\mono-basic-block.h" /> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\mono-config.c" /> @@ -208,6 +214,9 @@ <ClInclude Include="$(MonoSourceLocation)\mono\metadata\sgen-toggleref.h" /> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\sgen-stw.c" /> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\sgen-mono.c" /> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\sgen-mono.h" /> + <ClCompile Include="$(MonoSourceLocation)\mono\metadata\sgen-mono-ilgen.c" /> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\sgen-mono-ilgen.h" /> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\sgen-client-mono.h" /> </ItemGroup> <ItemGroup Label="libmonoruntimeinclude_headers"> diff --git a/msvc/libmonoruntime-common.targets.filters b/msvc/libmonoruntime-common.targets.filters index 727804ea317..9d0f46fb827 100644 --- a/msvc/libmonoruntime-common.targets.filters +++ b/msvc/libmonoruntime-common.targets.filters @@ -166,6 +166,12 @@ <ClInclude Include="$(MonoSourceLocation)\mono\metadata\marshal.h"> <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> </ClInclude> + <ClCompile Include="$(MonoSourceLocation)\mono\metadata\marshal-ilgen.c"> + <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common</Filter> + </ClCompile> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\marshal-ilgen.h"> + <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> + </ClInclude> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\marshal-internals.h"> <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> </ClInclude> @@ -190,9 +196,21 @@ <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder.h"> <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> </ClInclude> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder-internals.h"> + <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> + </ClInclude> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\method-builder.c"> <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common</Filter> </ClCompile> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder-ilgen.h"> + <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> + </ClInclude> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\method-builder-ilgen-internals.h"> + <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common</Filter> + </ClInclude> + <ClCompile Include="$(MonoSourceLocation)\mono\metadata\method-builder-ilgen.c"> + <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common</Filter> + </ClCompile> <ClCompile Include="$(MonoSourceLocation)\mono\metadata\mono-basic-block.c"> <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common</Filter> </ClCompile> @@ -565,6 +583,15 @@ <ClCompile Include="$(MonoSourceLocation)\mono\metadata\sgen-mono.c"> <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common\sgen</Filter> </ClCompile> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\sgen-mono.h"> + <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common\sgen</Filter> + </ClInclude> + <ClCompile Include="$(MonoSourceLocation)\mono\metadata\sgen-mono-ilgen.c"> + <Filter>Source Files$(MonoRuntimeFilterSubFolder)\common\sgen</Filter> + </ClCompile> + <ClInclude Include="$(MonoSourceLocation)\mono\metadata\sgen-mono-ilgen.h"> + <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common\sgen</Filter> + </ClInclude> <ClInclude Include="$(MonoSourceLocation)\mono\metadata\sgen-client-mono.h"> <Filter>Header Files$(MonoRuntimeFilterSubFolder)\common\sgen</Filter> </ClInclude> |