@@ -6,12 +6,9 @@ set(MONO_EVENTPIPE_GEN_INCLUDE_PATH "${CMAKE_CURRENT_BINARY_DIR}/eventpipe")
6
6
set (MONO_HOT_RELOAD_COMPONENT_NAME "hot_reload" )
7
7
set (MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME "diagnostics_tracing" )
8
8
set (MONO_DEBUGGER_COMPONENT_NAME "debugger" )
9
- set (MONO_MARSHAL_ILGEN_COMPONENT_NAME "marshal-ilgen" )
10
9
11
10
# a list of every component.
12
11
set (components "" )
13
- # a list of components needed by the AOT compiler
14
- set (components_for_aot "" )
15
12
16
13
# the sources for each individiable component define a new
17
14
# component_name-sources list for each component, and a
@@ -82,53 +79,17 @@ set(${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME}-dependencies
82
79
${MONO_DIAGNOSTICS_TRACING_COMPONENT_NAME} -gen-sources
83
80
)
84
81
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
-
121
82
# from here down, all the components are treated in the same way
122
83
123
84
#define a library for each component and component stub
124
85
function (define_component_libs )
125
86
# 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 )
128
89
add_library ("mono-component-${component} -static" STATIC $< TARGET_OBJECTS:${component} -objects> )
129
90
install (TARGETS "mono-component-${component} -static" LIBRARY )
130
91
endforeach ()
131
- foreach (component IN LISTS stubs_to_build )
92
+ foreach (component IN LISTS components )
132
93
add_library ("mono-component-${component} -stub-static" STATIC $< TARGET_OBJECTS:${component} -stub-objects> )
133
94
install (TARGETS "mono-component-${component} -stub-static" LIBRARY )
134
95
endforeach ()
@@ -142,7 +103,7 @@ target_sources(component_base INTERFACE
142
103
)
143
104
target_link_libraries (component_base INTERFACE monoapi )
144
105
145
- if (NOT AOT_COMPONENTS AND ( DISABLE_COMPONENTS OR DISABLE_LIBS ) )
106
+ if (DISABLE_COMPONENTS OR DISABLE_LIBS )
146
107
set (DISABLE_COMPONENT_OBJECTS 1 )
147
108
endif ()
148
109
@@ -162,7 +123,7 @@ endforeach()
162
123
163
124
if (NOT DISABLE_COMPONENTS AND NOT STATIC_COMPONENTS )
164
125
# define a shared library for each component
165
- foreach (component IN LISTS components_to_build )
126
+ foreach (component IN LISTS components )
166
127
# NOTE: keep library naming pattern in sync with RuntimeComponentManifest.targets
167
128
if (HOST_WIN32 )
168
129
add_library ("mono-component-${component} " SHARED "${${component} -sources}" )
@@ -194,14 +155,14 @@ if(NOT DISABLE_COMPONENTS AND NOT STATIC_COMPONENTS)
194
155
#define a library for each component and component stub
195
156
define_component_libs ()
196
157
197
- elseif (AOT_COMPONENTS OR ( NOT DISABLE_COMPONENTS AND STATIC_COMPONENTS ) )
158
+ elseif (NOT DISABLE_COMPONENTS AND STATIC_COMPONENTS )
198
159
199
160
#define a library for each component and component stub
200
161
define_component_libs ()
201
162
202
163
# define a list of mono-components objects for mini if building a shared libmono with static-linked components
203
164
set (mono-components-objects "" )
204
- foreach (component IN LISTS components_to_build )
165
+ foreach (component IN LISTS components )
205
166
list (APPEND mono-components-objects $< TARGET_OBJECTS:${component} -objects> )
206
167
endforeach ()
207
168
0 commit comments