зеркало из https://github.com/mono/ikvm-fork.git
Hookup AssemblyResolver's assembly version warning in ikvmc.
This commit is contained in:
Родитель
495e209de8
Коммит
e358b6835e
|
@ -94,6 +94,7 @@ class IkvmcCompiler
|
|||
int rc = comp.ParseCommandLine(argList.GetEnumerator(), targets, toplevel);
|
||||
if (rc == 0)
|
||||
{
|
||||
loader.HigherVersion += new AssemblyResolver.HigherVersionEvent(loader_HigherVersion);
|
||||
loader.Init(StaticCompiler.Universe, nostdlib, toplevel.unresolvedReferences, libpaths);
|
||||
}
|
||||
if (rc == 0)
|
||||
|
@ -138,6 +139,11 @@ class IkvmcCompiler
|
|||
return rc;
|
||||
}
|
||||
|
||||
static void loader_HigherVersion(AssemblyName assemblyDef, AssemblyName assemblyRef)
|
||||
{
|
||||
StaticCompiler.IssueMessage(Message.AssumeAssemblyVersionMatch, assemblyDef.FullName, assemblyRef.FullName);
|
||||
}
|
||||
|
||||
private static int ResolveStrongNameKeys(List<CompilerOptions> targets)
|
||||
{
|
||||
foreach (CompilerOptions options in targets)
|
||||
|
|
|
@ -3184,6 +3184,7 @@ namespace IKVM.Internal
|
|||
EmittedClassFormatError = 120,
|
||||
InvalidCustomAttribute = 121,
|
||||
IgnoredCustomAttribute = 122,
|
||||
AssumeAssemblyVersionMatch = 123,
|
||||
}
|
||||
|
||||
static class StaticCompiler
|
||||
|
@ -3381,6 +3382,9 @@ namespace IKVM.Internal
|
|||
msg = "custom attribute \"{0}\" was ignored" + Environment.NewLine +
|
||||
" (\"{1}\")";
|
||||
break;
|
||||
case Message.AssumeAssemblyVersionMatch:
|
||||
msg = "assuming assembly reference \"{0}\" matches \"{1}\", you may need to supply runtime policy";
|
||||
break;
|
||||
default:
|
||||
throw new InvalidProgramException();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче