Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,6 @@ if(ENABLE_MINIMAL)
process_enable_minimal()
endif()

#
# This is the version of the corlib-runtime interface. When
# making changes to this interface (by changing the layout
# of classes the runtime knows about, changing icall signature or
# semantics etc), change this variable.
#
# This must be unique relative to corlib interface and semantics.
#
# If you change corlib such that a runtime change is required, or
# vice versa, change this string. Examples include removing icalls,
# adding icalls, changing icall signatures, and changing type layouts
# that both sides know.
#
# It is an arbitrary string and should be parsed as such.
# A guid works and is encouraged.
#
# There is no ordering of corlib versions, no old or new,
# an exact match is required between corlib and runtime.
#
# This line is parsed by other tools, it should remain in the format they expect.
#
set(MONO_CORLIB_VERSION 1A5E0066-58DC-428A-B21C-0AD6CDAE2789)

set(DISABLE_MDB 1)
set(DISABLE_COM 1)
set(DISABLE_PERFCOUNTERS 1)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<!-- Generate Mono corelib version file -->
<Import Project="GenerateMonoCoreLibVersionFile.targets" />

<PropertyGroup>
<EnableDefaultItems>false</EnableDefaultItems>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@
</type>

<type fullname="System.Environment">
<!-- appdomain.c: mono_get_corlib_version -->
<field name="mono_corlib_version" />
<method name="get_StackTrace" />
</type>

Expand Down
45 changes: 0 additions & 45 deletions src/mono/mono/metadata/appdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,37 +309,6 @@ mono_runtime_init_checked (MonoDomain *domain, MonoThreadStartCB start_cb, MonoT
HANDLE_FUNCTION_RETURN ();
}

static char*
mono_get_corlib_version (void)
{
ERROR_DECL (error);

MonoClass *klass;
MonoClassField *field;

klass = mono_class_load_from_name (mono_defaults.corlib, "System", "Environment");
mono_class_init_internal (klass);
field = mono_class_get_field_from_name_full (klass, "mono_corlib_version", NULL);
if (!field)
return NULL;

if (! (field->type->attrs & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_LITERAL)))
return NULL;

char *value;
MonoTypeEnum field_type;
const char *data = mono_class_get_field_default_value (field, &field_type);
if (field_type != MONO_TYPE_STRING)
return NULL;
mono_metadata_read_constant_value (data, field_type, &value, error);
mono_error_assert_ok (error);

char *res = mono_string_from_blob (value, error);
mono_error_assert_ok (error);

return res;
}

/**
* mono_check_corlib_version:
* Checks that the corlib that is loaded matches the version of this runtime.
Expand All @@ -364,18 +333,6 @@ mono_check_corlib_version_internal (void)
return NULL;
#else
char *result = NULL;
char *version = mono_get_corlib_version ();
if (!version) {
result = g_strdup_printf ("expected corlib string (%s) but not found or not string", MONO_CORLIB_VERSION);
goto exit;
}
if (strcmp (version, MONO_CORLIB_VERSION) != 0) {
result = g_strdup_printf ("The runtime did not find the mscorlib.dll it expected. "
"Expected interface version %s but found %s. Check that "
"your runtime and class libraries are matching.",
MONO_CORLIB_VERSION, version);
goto exit;
}

/* Check that the managed and unmanaged layout of MonoInternalThread matches */
guint32 native_offset;
Expand All @@ -384,8 +341,6 @@ mono_check_corlib_version_internal (void)
managed_offset = mono_field_get_offset (mono_class_get_field_from_name_full (mono_defaults.internal_thread_class, "last", NULL));
if (native_offset != managed_offset)
result = g_strdup_printf ("expected InternalThread.last field offset %u, found %u. See InternalThread.last comment", native_offset, managed_offset);
exit:
g_free (version);
return result;
#endif
}
Expand Down