private bool keycontainer = false;
private string keyname;
private StrongName sn;
+ bool noautoinherit;
public DriverMain (string[] args)
{
if (output_file == null)
output_file = CreateOutputFilename ();
try {
- codegen = new CodeGen (output_file, target == Target.Dll, debugging_info);
+ codegen = new CodeGen (output_file, target == Target.Dll, debugging_info, noautoinherit);
foreach (string file_path in il_file_list) {
Report.FilePath = file_path;
ProcessFile (file_path);
else
keyname = command_arg;
break;
+ case "noautoinherit":
+ noautoinherit = true;
+ break;
case "scan_only":
scan_only = true;
break;
private void Usage ()
{
- Console.WriteLine ("Mono ILasm compiler\n" +
+ Console.WriteLine ("Mono IL assembler compiler\n" +
"ilasm [options] source-files\n" +
- " --about About the Mono ILasm compiler\n" +
- " --version Print the version number of the Mono ILasm compiler\n" +
+ " --about About the Mono IL assembler compiler\n" +
+ " --version Print the version number of the compiler\n" +
" /output:file_name Specifies output file.\n" +
" /exe Compile to executable.\n" +
" /dll Compile to library.\n" +
" /debug Include debug information.\n" +
" /key:keyfile Strongname using the specified key file\n" +
" /key:@container Strongname using the specified key container\n" +
+ " /noautoinherit Disable inheriting from System.Object by default\n" +
"Options can be of the form -option or /option\n");
Environment.Exit (1);
}
private void Version ()
{
string version = System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version.ToString ();
- Console.WriteLine ("Mono ILasm compiler version {0}", version);
+ Console.WriteLine ("Mono IL assembler compiler version {0}", version);
Environment.Exit (0);
}
private string output_file;\r
private bool is_dll;\r
private bool entry_point;\r
+ bool noautoinherit;\r
\r
private Module this_module;\r
\r
- public CodeGen (string output_file, bool is_dll, bool debugging_info)\r
+ public CodeGen (string output_file, bool is_dll, bool debugging_info, bool noautoinherit)\r
{\r
this.output_file = output_file;\r
this.is_dll = is_dll;\r
-\r
+ this.noautoinherit = noautoinherit;\r
+ \r
if (debugging_info)\r
symwriter = new SymbolWriter (output_file);\r
\r
\r
typedef = new TypeDef (attr, current_namespace,\r
name, parent, impl_list, location, gen_params, outer);\r
-\r
+ typedef.NoAutoInherit = noautoinherit && parent == null;\r
type_manager[cache_name] = typedef;\r
current_customattrtarget = current_typedef = typedef;\r
current_declsectarget = typedef;\r
<ItemGroup>
<Reference Include="System" />
<Reference Include="PEAPI">
- <HintPath>..\class\lib\net_4_5\PEAPI.dll</HintPath>
+ <HintPath>..\class\lib\net_4_x\PEAPI.dll</HintPath>
</Reference>
<Reference Include="Mono.CompilerServices.SymbolWriter" />
<Reference Include="Mono.Security" />