AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
- reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization.],
+ reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, simd, soft_debug, normalization, assembly_remapping.],
[
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
eval "mono_feature_disable_$feature='yes'"
AC_MSG_NOTICE([Disabled String normalization support.])
fi
+if test "x$mono_feature_disable_assembly_remapping" = "xyes"; then
+ AC_DEFINE(DISABLE_ASSEMBLY_REMAPPING, 1, [Disable assembly remapping.])
+ AC_MSG_NOTICE([Disabled Assembly remapping.])
+fi
+
AC_MSG_CHECKING(for visibility __attribute__)
AC_TRY_COMPILE([], [
void __attribute__ ((visibility ("hidden"))) doit (void) {}
/* Contains the list of directories that point to auxiliary GACs */
static char **extra_gac_paths = NULL;
+#ifndef DISABLE_ASSEMBLY_REMAPPING
/* The list of system assemblies what will be remapped to the running
* runtime version. WARNING: this list must be sorted.
*/
{"System.Xml", 0},
{"mscorlib", 0}
};
+#endif
/*
* keeps track of loaded assemblies
InterlockedIncrement (&assembly->ref_count);
}
+#ifndef DISABLE_ASSEMBLY_REMAPPING
static MonoAssemblyName *
mono_assembly_remap_version (MonoAssemblyName *aname, MonoAssemblyName *dest_aname)
{
}
return aname;
}
+#endif
/*
* mono_assembly_get_assemblyref:
mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *status)
{
MonoAssembly *res;
- MonoAssemblyName *aname, base_name, maped_aname;
+ MonoAssemblyName *aname, base_name;
+#ifndef DISABLE_ASSEMBLY_REMAPPING
+ MonoAssemblyName maped_aname;
+#endif
gchar *fullname, *gacpath;
gchar **paths;
if (!mono_assembly_name_parse (name, aname))
return NULL;
+#ifndef DISABLE_ASSEMBLY_REMAPPING
/*
* If no specific version has been requested, make sure we load the
* correct version for system assemblies.
*/
if ((aname->major | aname->minor | aname->build | aname->revision) == 0)
aname = mono_assembly_remap_version (aname, &maped_aname);
+#endif
res = mono_assembly_loaded (aname);
if (res) {
{
MonoAssembly *result;
char *fullpath, *filename;
- MonoAssemblyName maped_aname, maped_name_pp;
+#ifndef DISABLE_ASSEMBLY_REMAPPING
+ MonoAssemblyName maped_aname;
+#endif
+ MonoAssemblyName maped_name_pp;
int ext_index;
const char *ext;
int len;
+#ifndef DISABLE_ASSEMBLY_REMAPPING
aname = mono_assembly_remap_version (aname, &maped_aname);
+#endif
/* Reflection only assemblies don't get assembly binding */
if (!refonly)
mono_assembly_loaded_full (MonoAssemblyName *aname, gboolean refonly)
{
MonoAssembly *res;
+#ifndef DISABLE_ASSEMBLY_REMAPPING
MonoAssemblyName maped_aname;
aname = mono_assembly_remap_version (aname, &maped_aname);
+#endif
res = mono_assembly_invoke_search_hook_internal (aname, refonly, FALSE);