Skip to content

Commit bc7f9d5

Browse files
committed
Revert "[MONO] Move marshal-ilgen into a component (dotnet#71203)"
This reverts commit de32c44.
1 parent b27b298 commit bc7f9d5

27 files changed

+3047
-3366
lines changed

src/installer/pkg/sfx/Microsoft.NETCore.App/Directory.Build.props

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,6 @@
205205
<PlatformManifestFileEntry Include="libmono-component-debugger-stub-static.a" IsNative="true" />
206206
<PlatformManifestFileEntry Include="libmono-component-debugger-static.lib" IsNative="true" />
207207
<PlatformManifestFileEntry Include="libmono-component-debugger-stub-static.lib" IsNative="true" />
208-
<PlatformManifestFileEntry Include="libmono-component-marshal-ilgen.dll" IsNative="true" />
209-
<PlatformManifestFileEntry Include="libmono-component-marshal-ilgen.so" IsNative="true" />
210-
<PlatformManifestFileEntry Include="libmono-component-marshal-ilgen.dylib" IsNative="true" />
211-
<PlatformManifestFileEntry Include="libmono-component-marshal-ilgen-static.a" IsNative="true" />
212-
<PlatformManifestFileEntry Include="libmono-component-marshal-ilgen-stub-static.a" IsNative="true" />
213-
<PlatformManifestFileEntry Include="libmono-component-marshal-ilgen-static.lib" IsNative="true" />
214-
<PlatformManifestFileEntry Include="libmono-component-marshal-ilgen-stub-static.lib" IsNative="true" />
215208
<!-- Mono WASM-specific files -->
216209
<PlatformManifestFileEntry Include="libmono-ee-interp.a" IsNative="true" />
217210
<PlatformManifestFileEntry Include="libmono-icall-table.a" IsNative="true" />

src/libraries/System.Diagnostics.Tracing/tests/System.Diagnostics.Tracing.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
77
</PropertyGroup>
88
<PropertyGroup>
9-
<RuntimeComponents Condition="'$(TargetsAppleMobile)' == 'true' or '$(TargetOS)' == 'Android'">diagnostics_tracing;marshal-ilgen</RuntimeComponents>
9+
<RuntimeComponents Condition="'$(TargetsAppleMobile)' == 'true' or '$(TargetOS)' == 'Android'">diagnostics_tracing</RuntimeComponents>
1010
</PropertyGroup>
1111
<!-- Windows only files -->
1212
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">

src/mono/mono.proj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,7 @@
733733
<MonoAOTCMakeArgs Include="-DENABLE_ICALL_SYMBOL_MAP=1" />
734734
<MonoAOTCMakeArgs Include="-DDISABLE_SHARED_LIBS=1" />
735735
<MonoAOTCMakeArgs Include="-DDISABLE_LIBS=1" />
736-
<!-- Link in only the components neeeded for AOT compilation -->
737-
<MonoAOTCMakeArgs Include="-DAOT_COMPONENTS=1 -DSTATIC_COMPONENTS=1;" />
736+
<MonoAOTCMakeArgs Include="-DDISABLE_COMPONENTS=1" />
738737
<MonoAOTCMakeArgs Condition="'$(MonoAotOffsetsFile)' != ''" Include="-DAOT_OFFSETS_FILE=&quot;$(MonoAotOffsetsFile)&quot;" />
739738
<MonoAOTCMakeArgs Condition="'$(MonoAOTEnableLLVM)' == 'true'" Include="-DLLVM_PREFIX=$(MonoAOTLLVMDir.TrimEnd('\/'))" />
740739
<MonoAOTCMakeArgs Include="$(_MonoAOTCFLAGSOption)" />

src/mono/mono/component/CMakeLists.txt

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ set(MONO_EVENTPIPE_GEN_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/eventpipe")
66
set(MONO_HOT_RELOAD_COMPONENT_NAME "hot_reload")
77
set(MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME "diagnostics_tracing")
88
set(MONO_DEBUGGER_COMPONENT_NAME "debugger")
9-
set(MONO_MARSHAL_ILGEN_COMPONENT_NAME "marshal-ilgen")
109

1110
# a list of every component.
1211
set(components "")
13-
# a list of components needed by the AOT compiler
14-
set(components_for_aot "")
1512

1613
# the sources for each individiable component define a new
1714
# component_name-sources list for each component, and a
@@ -82,53 +79,17 @@ set(${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-dependencies
8279
${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-gen-sources
8380
)
8481

85-
# marshal-ilgen
86-
list(APPEND components
87-
${MONO_MARSHAL_ILGEN_COMPONENT_NAME}
88-
)
89-
list(APPEND components_for_aot
90-
${MONO_MARSHAL_ILGEN_COMPONENT_NAME}
91-
)
92-
93-
set(${MONO_MARSHAL_ILGEN_COMPONENT_NAME}-sources
94-
${MONO_COMPONENT_PATH}/marshal-ilgen.c
95-
${MONO_COMPONENT_PATH}/marshal-ilgen.h
96-
${MONO_COMPONENT_PATH}/marshal-ilgen-noilgen.c
97-
${MONO_COMPONENT_PATH}/marshal-ilgen-noilgen.h
98-
)
99-
100-
# For every component not build into the AOT compiler, build the stub instead
101-
set(stubs_for_aot "")
102-
foreach (component IN LISTS components)
103-
if (NOT (component IN_LIST components_for_aot))
104-
list(APPEND stubs_for_aot "${component}")
105-
endif()
106-
endforeach()
107-
108-
109-
set(${MONO_MARSHAL_ILGEN_COMPONENT_NAME}-stub-sources
110-
${MONO_COMPONENT_PATH}/marshal-ilgen-stub.c
111-
)
112-
113-
if (AOT_COMPONENTS)
114-
set(components_to_build ${components_for_aot})
115-
set(stubs_to_build ${stubs_for_aot})
116-
else()
117-
set(components_to_build ${components})
118-
set(stubs_to_build ${components})
119-
endif()
120-
12182
# from here down, all the components are treated in the same way
12283

12384
#define a library for each component and component stub
12485
function(define_component_libs)
12586
# NOTE: keep library naming pattern in sync with RuntimeComponentManifest.targets
126-
if (AOT_COMPONENTS OR NOT DISABLE_LIBS )
127-
foreach(component IN LISTS components_to_build)
87+
if (NOT DISABLE_LIBS)
88+
foreach(component IN LISTS components)
12889
add_library("mono-component-${component}-static" STATIC $<TARGET_OBJECTS:${component}-objects>)
12990
install(TARGETS "mono-component-${component}-static" LIBRARY)
13091
endforeach()
131-
foreach(component IN LISTS stubs_to_build)
92+
foreach(component IN LISTS components)
13293
add_library("mono-component-${component}-stub-static" STATIC $<TARGET_OBJECTS:${component}-stub-objects>)
13394
install(TARGETS "mono-component-${component}-stub-static" LIBRARY)
13495
endforeach()
@@ -142,7 +103,7 @@ target_sources(component_base INTERFACE
142103
)
143104
target_link_libraries(component_base INTERFACE monoapi)
144105

145-
if(NOT AOT_COMPONENTS AND (DISABLE_COMPONENTS OR DISABLE_LIBS))
106+
if(DISABLE_COMPONENTS OR DISABLE_LIBS)
146107
set(DISABLE_COMPONENT_OBJECTS 1)
147108
endif()
148109

@@ -162,7 +123,7 @@ endforeach()
162123

163124
if(NOT DISABLE_COMPONENTS AND NOT STATIC_COMPONENTS)
164125
# define a shared library for each component
165-
foreach(component IN LISTS components_to_build)
126+
foreach(component IN LISTS components)
166127
# NOTE: keep library naming pattern in sync with RuntimeComponentManifest.targets
167128
if(HOST_WIN32)
168129
add_library("mono-component-${component}" SHARED "${${component}-sources}")
@@ -194,14 +155,14 @@ if(NOT DISABLE_COMPONENTS AND NOT STATIC_COMPONENTS)
194155
#define a library for each component and component stub
195156
define_component_libs()
196157

197-
elseif(AOT_COMPONENTS OR (NOT DISABLE_COMPONENTS AND STATIC_COMPONENTS))
158+
elseif(NOT DISABLE_COMPONENTS AND STATIC_COMPONENTS)
198159

199160
#define a library for each component and component stub
200161
define_component_libs()
201162

202163
# define a list of mono-components objects for mini if building a shared libmono with static-linked components
203164
set(mono-components-objects "")
204-
foreach(component IN LISTS components_to_build)
165+
foreach(component IN LISTS components)
205166
list(APPEND mono-components-objects $<TARGET_OBJECTS:${component}-objects>)
206167
endforeach()
207168

src/mono/mono/component/marshal-ilgen-noilgen.c

Lines changed: 0 additions & 186 deletions
This file was deleted.

src/mono/mono/component/marshal-ilgen-noilgen.h

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/mono/mono/component/marshal-ilgen-stub.c

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)