[mini] Add a mono_jit_aot_compiling () function.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 28 Jul 2017 21:23:51 +0000 (23:23 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Tue, 1 Aug 2017 04:15:06 +0000 (06:15 +0200)
mono/mini/driver.c
mono/mini/jit.h

index f8287c722d2a462f3f10a99c512813323156895f..f8d485292afd01fb50f4b7e7fc14c08e261704bd 100644 (file)
@@ -2378,6 +2378,12 @@ mono_jit_set_aot_mode (MonoAotMode mode)
        }
 }
 
+mono_bool
+mono_jit_aot_compiling (void)
+{
+       return mono_compile_aot;
+}
+
 /**
  * mono_jit_set_trace_options:
  * \param options string representing the trace options
index ec77d70b566e0495f7aa8b729e6cf053bb7d3777..408fead304ef2f95073bbe518c329125f519ea24 100644 (file)
@@ -63,6 +63,13 @@ typedef enum {
 MONO_API void
 mono_jit_set_aot_mode      (MonoAotMode mode);
 
+/*
+ * Returns whether the runtime was invoked for the purpose of AOT-compiling an
+ * assembly, i.e. no managed code will run.
+ */
+MONO_API mono_bool
+mono_jit_aot_compiling (void);
+
 /* Allow embedders to decide wherther to actually obey breakpoint instructions
  * in specific methods (works for both break IL instructions and Debugger.Break ()
  * method calls).