[wasm] Add MONO_AOT_MODE_INTERP_LLVMONLY to MonoAotMode. This is what wasm+interprete...
[mono.git] / mono / mini / driver.c
index 6f977ecb37d990a586d3c92344b9c54c83659ce1..f293f7c6803ff1e3dc488d9d694711479610b208 100644 (file)
@@ -512,6 +512,11 @@ mini_regression (MonoImage *image, int verbose, int *total_run)
                }
        } else {
                for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
+                       /* builtin-types.cs needs OPT_INTRINS enabled */
+                       if (!strcmp ("builtin-types", image->assembly_name))
+                               if (!(opt_sets [opt] & MONO_OPT_INTRINS))
+                                       continue;
+
                        mini_regression_step (image, verbose, total_run, &total,
                                        opt_sets [opt] & ~exclude,
                                        timer, domain);
@@ -1415,7 +1420,7 @@ mono_jit_parse_options (int argc, char * argv[])
                        opt->break_on_exc = TRUE;
                } else if (strcmp (argv [i], "--stats") == 0) {
                        mono_counters_enable (-1);
-                       mono_stats.enabled = TRUE;
+                       InterlockedWriteBool (&mono_stats.enabled, TRUE);
                        mono_jit_stats.enabled = TRUE;
                } else if (strcmp (argv [i], "--break") == 0) {
                        if (i+1 >= argc){
@@ -1762,7 +1767,7 @@ mono_main (int argc, char* argv[])
                        mono_print_vtable = TRUE;
                } else if (strcmp (argv [i], "--stats") == 0) {
                        mono_counters_enable (-1);
-                       mono_stats.enabled = TRUE;
+                       InterlockedWriteBool (&mono_stats.enabled, TRUE);
                        mono_jit_stats.enabled = TRUE;
 #ifndef DISABLE_AOT
                } else if (strcmp (argv [i], "--aot") == 0) {
@@ -2371,6 +2376,17 @@ mono_jit_set_aot_mode (MonoAotMode mode)
                mono_aot_only = TRUE;
                mono_use_interpreter = TRUE;
        }
+       if (mono_aot_mode == MONO_AOT_MODE_INTERP_LLVMONLY) {
+               mono_aot_only = TRUE;
+               mono_use_interpreter = TRUE;
+               mono_llvm_only = TRUE;
+       }
+}
+
+mono_bool
+mono_jit_aot_compiling (void)
+{
+       return mono_compile_aot;
 }
 
 /**