X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fdriver.c;h=3d179097328ffcc8d4bf731f00f5258af7a42cfb;hb=2baec073f4ee9519f9b47c42ca1eb02f626f3955;hp=5855b81ca9792f6248b26d9b0d1c8a0053f2b1c4;hpb=3f8134d3fdc8cd4d1b3193bf81a19efa2001a5e5;p=mono.git diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 5855b81ca97..3d179097328 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -10,7 +10,9 @@ */ #include +#ifdef HAVE_SIGNAL_H #include +#endif #if HAVE_SCHED_SETAFFINITY #include #endif @@ -57,7 +59,7 @@ #include "version.h" #include "debugger-agent.h" -static FILE *mini_stats_fd = NULL; +static FILE *mini_stats_fd; static void mini_usage (void); @@ -408,8 +410,7 @@ mini_regression_step (MonoImage *image, int verbose, int *total_run, int *total, } else { cfailed++; - if (verbose) - g_print ("Test '%s' failed compilation.\n", method->name); + g_print ("Test '%s' failed compilation.\n", method->name); } if (mini_stats_fd) fprintf (mini_stats_fd, "%f, ", @@ -1308,7 +1309,6 @@ static const char info[] = #ifdef HOST_WIN32 BOOL APIENTRY DllMain (HMODULE module_handle, DWORD reason, LPVOID reserved) { - int dummy; if (!mono_gc_dllmain (module_handle, reason, reserved)) return FALSE; @@ -1518,9 +1518,6 @@ mono_main (int argc, char* argv[]) if (g_getenv ("MONO_NO_SMP")) mono_set_use_smp (FALSE); - if (!g_thread_supported ()) - g_thread_init (NULL); - g_log_set_always_fatal (G_LOG_LEVEL_ERROR); g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR); @@ -1873,6 +1870,8 @@ mono_main (int argc, char* argv[]) g_set_prgname (argv[i]); } + mono_counters_init (); + if (enable_profile) mono_profiler_load (profile_options); @@ -1907,6 +1906,14 @@ mono_main (int argc, char* argv[]) mono_load_coree (argv [i]); #endif + /* Set rootdir before loading config */ + mono_set_rootdir (); + + /* Parse gac loading options before loading assemblies. */ + if (mono_compile_aot || action == DO_EXEC || action == DO_DEBUGGER) { + mono_config_parse (config_file); + } + mono_set_defaults (mini_verbose, opt); domain = mini_init (argv [i], forced_version); @@ -1972,11 +1979,6 @@ mono_main (int argc, char* argv[]) break; } - /* Parse gac loading options before loading assemblies. */ - if (mono_compile_aot || action == DO_EXEC || action == DO_DEBUGGER) { - mono_config_parse (config_file); - } - #ifdef MONO_JIT_INFO_TABLE_TEST if (test_jit_info_table) jit_info_table_test (domain); @@ -2002,7 +2004,7 @@ mono_main (int argc, char* argv[]) fprintf (stderr, "Corlib not in sync with this runtime: %s\n", error); fprintf (stderr, "Loaded from: %s\n", mono_defaults.corlib? mono_image_get_filename (mono_defaults.corlib): "unknown"); - fprintf (stderr, "Download a newer corlib or a newer runtime at http://www.go-mono.com/daily.\n"); + fprintf (stderr, "Download a newer corlib or a newer runtime at http://www.mono-project.com/download.\n"); exit (1); } @@ -2182,6 +2184,8 @@ mono_jit_init_version (const char *domain_name, const char *runtime_version) void mono_jit_cleanup (MonoDomain *domain) { + mono_thread_manage (); + mini_cleanup (domain); }