Skip to content

Commit 148bc08

Browse files
authored
Remove mono config file support. (#48007)
* Remove mono config file support. * Remove unused mono_runtime_unhandled_exception_policy_set (). * Fix the build.
1 parent aee6607 commit 148bc08

File tree

9 files changed

+5
-805
lines changed

9 files changed

+5
-805
lines changed

src/mono/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ set(DISABLE_MDB 1)
7979
set(DISABLE_COM 1)
8080
set(DISABLE_PERFCOUNTERS 1)
8181
set(DISABLE_ATTACH 1)
82-
set(DISABLE_CONFIG 1)
83-
set(DISABLE_CFGDIR_CONFIG 1)
8482
set(DISABLE_VERIFIER 1)
8583

8684
# Dependencies between options

src/mono/mono/metadata/domain.c

+4-13
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,6 @@ mono_cleanup (void)
836836

837837
mono_defaults.corlib = NULL;
838838

839-
mono_config_cleanup ();
840839
mono_loader_cleanup ();
841840
mono_classes_cleanup ();
842841
mono_assemblies_cleanup ();
@@ -1487,23 +1486,15 @@ app_config_parse (const char *exe_filename)
14871486
GMarkupParseContext *context;
14881487
char *text;
14891488
gsize len;
1490-
const char *bundled_config;
14911489
char *config_filename;
14921490

1493-
bundled_config = mono_config_string_for_assembly_file (exe_filename);
1491+
config_filename = g_strconcat (exe_filename, ".config", (const char*)NULL);
14941492

1495-
if (bundled_config) {
1496-
text = g_strdup (bundled_config);
1497-
len = strlen (text);
1498-
} else {
1499-
config_filename = g_strconcat (exe_filename, ".config", (const char*)NULL);
1500-
1501-
if (!g_file_get_contents (config_filename, &text, &len, NULL)) {
1502-
g_free (config_filename);
1503-
return NULL;
1504-
}
1493+
if (!g_file_get_contents (config_filename, &text, &len, NULL)) {
15051494
g_free (config_filename);
1495+
return NULL;
15061496
}
1497+
g_free (config_filename);
15071498

15081499
app_config = g_new0 (AppConfigInfo, 1);
15091500

src/mono/mono/metadata/external-only.c

-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ mono_g_hash_table_new_type (GHashFunc hash_func, GEqualFunc key_equal_func, Mono
276276
void
277277
mono_config_for_assembly (MonoImage *assembly)
278278
{
279-
MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID (mono_config_for_assembly_internal (assembly));
280279
}
281280

282281
/**

src/mono/mono/metadata/metadata-internals.h

-2
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,6 @@ void mono_assembly_close_finish (MonoAssembly *assembly);
10891089
gboolean mono_public_tokens_are_equal (const unsigned char *pubt1, const unsigned char *pubt2);
10901090

10911091
void mono_config_parse_publisher_policy (const char *filename, MonoAssemblyBindingInfo *binding_info);
1092-
void mono_config_parse_assembly_bindings (const char *filename, int major, int minor, void *user_data,
1093-
void (*infocb)(MonoAssemblyBindingInfo *info, void *user_data));
10941092

10951093
gboolean
10961094
mono_assembly_name_parse_full (const char *name,

0 commit comments

Comments
 (0)