X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fdriver.c;h=7d0716dad90c909c3d68fd2f59b0f2af827ad276;hb=fee5ece80556eb45d16da5f6c0fde991e5af1d40;hp=514a7332a39c52785728a9a8e8a2fdc655d7083a;hpb=86e44dfdcbc36134f56616dfe0ee1c6ae81e02b7;p=mono.git diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 514a7332a39..7d0716dad90 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -49,10 +49,11 @@ #include #include #include +#include #include "mono/utils/mono-counters.h" #include "mono/utils/mono-hwcap.h" #include "mono/utils/mono-logger-internals.h" -#include "mono/utils/w32handle.h" +#include "mono/metadata/w32handle.h" #include "mini.h" #include "jit.h" @@ -934,7 +935,7 @@ compile_all_methods_thread_main_inner (CompileAllThreadArgs *args) (method->flags & METHOD_ATTRIBUTE_ABSTRACT)) continue; - if (method->klass->generic_container) + if (mono_class_is_gtd (method->klass)) continue; sig = mono_method_signature (method); if (!sig) { @@ -1274,6 +1275,7 @@ mini_usage (void) #ifdef HOST_WIN32 " --mixed-mode Enable mixed-mode image support.\n" #endif + " --handlers Install custom handlers, use --help-handlers for details.\n" ); } @@ -1556,6 +1558,10 @@ switch_arch (char* argv[], const char* target_arch) } #endif + +#define MONO_HANDLERS_ARGUMENT "--handlers=" +#define MONO_HANDLERS_ARGUMENT_LEN G_N_ELEMENTS(MONO_HANDLERS_ARGUMENT)-1 + /** * mono_main: * @argc: number of arguments in the argv array @@ -1908,6 +1914,15 @@ mono_main (int argc, char* argv[]) } else if (strcmp (argv [i], "--nacl-null-checks-off") == 0){ nacl_null_checks_off = TRUE; #endif + } else if (strncmp (argv [i], MONO_HANDLERS_ARGUMENT, MONO_HANDLERS_ARGUMENT_LEN) == 0) { + //Install specific custom handlers. + if (!mono_runtime_install_custom_handlers (argv[i] + MONO_HANDLERS_ARGUMENT_LEN)) { + fprintf (stderr, "error: " MONO_HANDLERS_ARGUMENT ", one or more unknown handlers: '%s'\n", argv [i]); + return 1; + } + } else if (strcmp (argv [i], "--help-handlers") == 0) { + mono_runtime_install_custom_handlers_usage (); + return 0; } else if (argv [i][0] == '-' && argv [i][1] == '-' && mini_parse_debug_option (argv [i] + 2)) { } else { fprintf (stderr, "Unknown command line option: '%s'\n", argv [i]); @@ -1942,9 +1957,9 @@ mono_main (int argc, char* argv[]) { char *runtime_path; - runtime_path = wapi_process_get_path (getpid ()); + runtime_path = mono_w32process_get_path (getpid ()); if (runtime_path) { - wapi_process_set_cli_launcher (runtime_path); + mono_w32process_set_cli_launcher (runtime_path); g_free (runtime_path); } }