Merge pull request #2868 from akoeplinger/maccore-fixes
authormonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 11 Apr 2016 15:50:26 +0000 (16:50 +0100)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Mon, 11 Apr 2016 15:50:26 +0000 (16:50 +0100)
[metadata] Ifdef out an icall that is not available in the DISABLE_REFLECTION_EMIT case

It caused errors like the following on the maccore builds:

```
  CCLD     libmonosgen-2.0.la
Undefined symbols for architecture armv7k:
  "_mono_reflection_get_custom_attrs_blob_checked", referenced from:
      _ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob in libmonoruntimesgen.a(libmonoruntimesgen_la-icall.o)
ld: symbol(s) not found for architecture armv7k
```

---

This is the last patch required for getting maccore master to build again with mono master.

@monojenkins merge

mono/metadata/icall-def.h
mono/metadata/icall.c

index dc00fd17b0d7e8773e3c1bad467208491301ba54..6a5dc193331b7e1ee3c8a3fe641a474f6b76e52d 100644 (file)
@@ -499,10 +499,10 @@ ICALL_TYPE(ASSEMB, "System.Reflection.Emit.AssemblyBuilder", ASSEMB_1)
 ICALL(ASSEMB_1, "InternalAddModule", ves_icall_System_Reflection_Emit_AssemblyBuilder_InternalAddModule)
 ICALL(ASSEMB_2, "basic_init", mono_image_basic_init)
 
+#ifndef DISABLE_REFLECTION_EMIT
 ICALL_TYPE(CATTRB, "System.Reflection.Emit.CustomAttributeBuilder", CATTRB_1)
 ICALL(CATTRB_1, "GetBlob", ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob)
 
-#ifndef DISABLE_REFLECTION_EMIT
 ICALL_TYPE(DERIVEDTYPE, "System.Reflection.Emit.DerivedType", DERIVEDTYPE_1)
 ICALL(DERIVEDTYPE_1, "create_unmanaged_type", mono_reflection_create_unmanaged_type)
 #endif
index 29d3b7c9ce80d829bafcdc038a9713967ff92958..c342e592a4c21c6df409727bfff139047d0e0499 100644 (file)
@@ -1285,6 +1285,7 @@ ves_icall_System_Reflection_Emit_TypeBuilder_create_generic_class (MonoReflectio
        mono_error_set_pending_exception (&error);
 }
 
+#ifndef DISABLE_REFLECTION_EMIT
 ICALL_EXPORT MonoArray*
 ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *propValues, MonoArray *fields, MonoArray* fieldValues)
 {
@@ -1293,6 +1294,7 @@ ves_icall_System_Reflection_Emit_CustomAttributeBuilder_GetBlob (MonoReflectionA
        mono_error_set_pending_exception (&error);
        return result;
 }
+#endif
 
 static gboolean
 get_executing (MonoMethod *m, gint32 no, gint32 ilo, gboolean managed, gpointer data)