зеркало из https://github.com/mono/ikvm-fork.git
Added ikvmc -filealign:<n> option.
This commit is contained in:
Родитель
86a4417e82
Коммит
91ee68395d
|
@ -342,6 +342,7 @@ class IkvmcCompiler
|
|||
Console.Error.WriteLine(" -sharedclassloader All targets below this level share a common");
|
||||
Console.Error.WriteLine(" class loader");
|
||||
Console.Error.WriteLine(" -baseaddress:<address> Base address for the library to be built");
|
||||
Console.Error.WriteLine(" -filealign:<n> Specify the alignment used for output file");
|
||||
Console.Error.WriteLine(" -nopeercrossreference Do not automatically cross reference all peers");
|
||||
Console.Error.WriteLine(" -nostdlib Do not reference standard libraries");
|
||||
Console.Error.WriteLine(" -lib:<dir> Additional directories to search for references");
|
||||
|
@ -771,6 +772,19 @@ class IkvmcCompiler
|
|||
}
|
||||
options.baseAddress = (long)(baseAddressParsed & 0xFFFFFFFFFFFF0000UL);
|
||||
}
|
||||
else if(s.StartsWith("-filealign:"))
|
||||
{
|
||||
int filealign;
|
||||
if (!Int32.TryParse(s.Substring(11), out filealign)
|
||||
|| filealign < 512
|
||||
|| filealign > 8192
|
||||
|| (filealign & (filealign - 1)) != 0)
|
||||
{
|
||||
Console.Error.WriteLine("Error: invalid file alignment: {0}", s.Substring(11));
|
||||
return 1;
|
||||
}
|
||||
options.fileAlignment = filealign;
|
||||
}
|
||||
else if(s == "-nopeercrossreference")
|
||||
{
|
||||
options.crossReferenceAllPeers = false;
|
||||
|
|
|
@ -170,6 +170,10 @@ namespace IKVM.Internal
|
|||
{
|
||||
moduleBuilder.__ImageBase = options.baseAddress;
|
||||
}
|
||||
if(options.fileAlignment != 0)
|
||||
{
|
||||
moduleBuilder.__FileAlignment = options.fileAlignment;
|
||||
}
|
||||
return moduleBuilder;
|
||||
}
|
||||
|
||||
|
@ -3398,6 +3402,7 @@ namespace IKVM.Internal
|
|||
internal PortableExecutableKinds pekind = PortableExecutableKinds.ILOnly;
|
||||
internal ImageFileMachine imageFileMachine = ImageFileMachine.I386;
|
||||
internal long baseAddress;
|
||||
internal int fileAlignment;
|
||||
internal List<CompilerClassLoader> sharedclassloader; // should *not* be deep copied in Copy(), because we want the list of all compilers that share a class loader
|
||||
internal Dictionary<string, string> suppressWarnings = new Dictionary<string, string>();
|
||||
internal Dictionary<string, string> errorWarnings = new Dictionary<string, string>(); // treat specific warnings as errors
|
||||
|
|
Загрузка…
Ссылка в новой задаче