/// <summary> /// Adds the additional options for the parsing process to the given OptionSet. /// </summary> /// <param name="optionSet">A given OptionSet to add the options to.</param> public void AddOptions(OptionSet optionSet) { IHasOptions options; optionSet.Add( "b|boot=", "Specify the bootable format of the produced binary [{mb0.7}].", delegate(string format) { this.implementation = SelectImplementation(format); } ); options = multiboot07Stage as IHasOptions; if (options != null) { options.AddOptions(optionSet); } }
/// <summary> /// Performs stage specific processing on the compiler context. /// </summary> /// <param name="compiler">The compiler context to perform processing in.</param> public void Run(AssemblyCompiler compiler) { CheckImplementation(); // Set the default entry point in the linker, if no previous stage has replaced it. RuntimeMethod entryPoint = compiler.Assembly.EntryPoint; if (this.implementation.EntryPoint == null && entryPoint != null) { this.implementation.EntryPoint = GetSymbol(entryPoint); } // Run the real linker IAssemblyCompilerStage acs = this.implementation as IAssemblyCompilerStage; Debug.Assert(acs != null, @"Linker doesn't implement IAssemblyCompilerStage."); if (acs != null) { acs.Run(compiler); } }
/// <summary> /// Performs stage specific processing on the compiler context. /// </summary> void IAssemblyCompilerStage.Run() { CheckImplementation(); ITypeModule mainModule = typeSystem.MainTypeModule; if (mainModule.MetadataModule.EntryPoint.RID != 0) { RuntimeMethod entrypoint = mainModule.GetMethod(mainModule.MetadataModule.EntryPoint); implementation.EntryPoint = GetSymbol(entrypoint.ToString()); } // Run the real linker IAssemblyCompilerStage assemblyCompilerStage = implementation as IAssemblyCompilerStage; Debug.Assert(assemblyCompilerStage != null, @"Linker doesn't implement IAssemblyCompilerStage."); if (assemblyCompilerStage != null) { assemblyCompilerStage.Run(); } }
/// <summary> /// Initializes a new instance of the BootFormatSelector class. /// </summary> public BootFormatSelector() { this.multiboot07Stage = new Multiboot0695AssemblyStage(); this.implementation = null; }
/// <summary> /// Adds the additional options for the parsing process to the given OptionSet. /// </summary> /// <param name="optionSet">A given OptionSet to add the options to.</param> public void AddOptions(OptionSet optionSet) { IHasOptions options; optionSet.Add( "b|boot=", "Specify the bootable format of the produced binary [{mb0.7}].", delegate(string format) { this.implementation = SelectImplementation(format); } ); options = multiboot07Stage as IHasOptions; if (options != null) options.AddOptions(optionSet); }