[aot] Emit gsharedvt wrappers only in llvmonly mode.
authorZoltan Varga <vargaz@gmail.com>
Mon, 1 Feb 2016 19:28:40 +0000 (14:28 -0500)
committerZoltan Varga <vargaz@gmail.com>
Mon, 1 Feb 2016 19:28:40 +0000 (14:28 -0500)
mono/mini/aot-compiler.c

index 0c02a8e416f19c231c9e7748cc0d2ca40d092e4d..b053cb2cfccfaa8e694cc2675ce5ff1d28b5e57f 100644 (file)
@@ -7324,14 +7324,14 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
        if (!cfg->has_got_slots)
                InterlockedIncrement (&acfg->stats.methods_without_got_slots);
 
-       if (!cfg->method->wrapper_type || cfg->method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE)
-               /* These only need out wrappers */
-               add_gsharedvt_wrappers (acfg, mono_method_signature (cfg->method), FALSE, TRUE);
-
        /* Add gsharedvt wrappers for signatures used by the method */
        if (acfg->aot_opts.llvm_only) {
                GSList *l;
 
+               if (!cfg->method->wrapper_type || cfg->method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE)
+                       /* These only need out wrappers */
+                       add_gsharedvt_wrappers (acfg, mono_method_signature (cfg->method), FALSE, TRUE);
+
                for (l = cfg->signatures; l; l = l->next) {
                        MonoMethodSignature *sig = mono_metadata_signature_dup ((MonoMethodSignature*)l->data);