+static void
+aot_cache_start (gpointer user_data,
+ const gchar *element_name,
+ const gchar **attribute_names,
+ const gchar **attribute_values)
+{
+ int i;
+ MonoAotCacheConfig *config;
+
+ if (strcmp (element_name, "aotcache") != 0)
+ return;
+
+ config = mono_get_aot_cache_config ();
+
+ /* Per-app configuration */
+ for (i = 0; attribute_names [i]; ++i) {
+ if (!strcmp (attribute_names [i], "app")) {
+ config->apps = g_slist_prepend (config->apps, g_strdup (attribute_values [i]));
+ }
+ }
+
+ /* Global configuration */
+ for (i = 0; attribute_names [i]; ++i) {
+ if (!strcmp (attribute_names [i], "assemblies")) {
+ char **parts, **ptr;
+ char *part;
+
+ parts = g_strsplit (attribute_values [i], " ", -1);
+ for (ptr = parts; ptr && *ptr; ptr ++) {
+ part = *ptr;
+ config->assemblies = g_slist_prepend (config->assemblies, g_strdup (part));
+ }
+ g_strfreev (parts);
+ } else if (!strcmp (attribute_names [i], "options")) {
+ config->aot_options = g_strdup (attribute_values [i]);
+ }
+ }
+}
+
+static const MonoParseHandler
+aot_cache_handler = {
+ "aotcache",
+ NULL, /* init */
+ aot_cache_start,
+ NULL, /* text */
+ NULL, /* end */
+ NULL, /* finish */
+};
+