示例#1
0
        /// <summary>
        /// Creates a mapping between configuration properties for the Visual
        /// C++ linker and corresponding command-line arguments.
        /// </summary>
        /// <returns>
        /// A mapping between configuration properties for the Visual C++
        /// linker and corresponding command-line arguments.
        /// </returns>
        /// <remarks>
        ///   <para>
        ///   The following configuration properties are processed by
        ///   <see cref="VcProject" />:
        ///   </para>
        ///   <list type="table">
        ///     <listheader>
        ///       <term>Category</term>
        ///       <description>Property</description>
        ///     </listheader>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Output File (/OUT:[file])</description>
        ///     </item>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Additional Library Directories (/LIBPATH:[dir])</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Additional Dependencies</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Add Module to Assembly (/ASSEMBLYMODULE:file)</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Embed Managed Resource File (/ASSEMBLYRESOURCE:file)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Generate Debug Info (/DEBUG)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Generate Program Database File (/PDB:name)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Generate Map File (/MAP)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Map File Name (/MAP:[filename])</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Heap Reserve Size (/HEAP:reserve)</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Heap Commit Size (/HEAP:reserve, commit)</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Stack Reserve Size (/STACK:reserve)</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Stack Commit Size (/STACK:reserve, commit)</description>
        ///     </item>
        ///   </list>
        ///   <para>
        ///   The following configuration properties are ignored:
        ///   </para>
        ///   <list type="table">
        ///     <listheader>
        ///       <term>Category</term>
        ///       <description>Property</description>
        ///     </listheader>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Show Progress (/VERBOSE, /VERBOSE:LIB)</description>
        ///     </item>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Suppress Startup Banner (/NOLOGO)</description>
        ///     </item>
        ///   </list>
        ///   <para>
        ///   Support for the following configuration properties still needs to
        ///   be implemented:
        ///   </para>
        ///   <list type="table">
        ///     <listheader>
        ///       <term>Category</term>
        ///       <description>Property</description>
        ///     </listheader>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Ignore Import Library</description>
        ///     </item>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Register Output</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Delay Loaded DLLs (/DELAYLOAD:[dll_name])</description>
        ///     </item>
        ///     <item>
        ///       <term>Embedded IDL</term>
        ///       <description>MIDL Commands (/MIDL:[file])</description>
        ///     </item>
        ///   </list>
        /// </remarks>
        public static VcArgumentMap CreateLinkerArgumentMap()
        {
            VcArgumentMap map = new VcArgumentMap();

            // General
            map.AddEnum("LinkIncremental", null, null, "/INCREMENTAL:NO", "/INCREMENTAL");
            map.AddLinkerString("Version", "/VERSION:", true);

            // Input
            map.AddBool("IgnoreAllDefaultLibraries", "/NODEFAULTLIB");
            map.AddQuotedLinkerString("ModuleDefinitionFile", "/DEF:", true);

            // Debugging
            map.AddQuotedLinkerString("StripPrivateSymbols", "/PDBSTRIPPED:", true);
            map.AddBool("MapExports", "/MAPINFO:EXPORTS");
            map.AddBool("MapLines", "/MAPINFO:LINES");
            map.AddEnum("AssemblyDebug", null, null, "/ASSEMBLYDEBUG", "/ASSEMBLYDEBUG:DISABLE");

            // System
            map.AddEnum("SubSystem", "/SUBSYSTEM:", null, "CONSOLE", "WINDOWS");
            map.AddEnum("LargeAddressAware", null, null, "/LARGEADDRESSAWARE:NO", "/LARGEADDRESSAWARE");
            map.AddEnum("TerminalServerAware", null, null, "/TSAWARE:NO", "/TSAWARE");
            map.AddBool("SwapRunFromCD", "/SWAPRUN:CD");
            map.AddBool("SwapRunFromNet", "/SWAPRUN:NET");

            // Optimization
            map.AddEnum("OptimizeReferences", "/OPT:", null, "NOREF", "REF");
            map.AddEnum("EnableCOMDATFolding", "/OPT:", null, "NOICF", "ICF");
            map.AddEnum("OptimizeForWindows98", "/OPT:", null, "NOWIN98", "WIN98");
            map.AddQuotedLinkerString("FunctionOrder", "/ORDER:", true);

            // Embedded IDL
            map.AddBool("IgnoreEmbeddedIDL", "/IGNOREIDL");
            map.AddQuotedLinkerString("MergedIDLBaseFileName", "/IDLOUT:", true);
            map.AddQuotedLinkerString("TypeLibraryFile", "/TLBOUT:", true);
            map.AddLinkerString("TypeLibraryResourceID", "/TLBID:");

            // Advanced
            map.AddQuotedLinkerString("EntryPointSymbol", "/ENTRY:", true);
            map.AddBool("ResourceOnlyDLL", "/NOENTRY");
            map.AddBool("SetChecksum", "/RELEASE");
            map.AddQuotedLinkerString("BaseAddress", "/BASE:", true);
            map.AddEnum("FixedBaseAddress", null, null, "/FIXED:NO", "/FIXED");
            map.AddBool("TurnOffAssemblyGeneration", "/NOASSEMBLY");
            map.AddBool("SupportUnloadOfDelayLoadedDLL", "/DELAY:UNLOAD");
            map.AddQuotedLinkerString("MergeSections", "/MERGE:", true);
            map.AddEnum("TargetMachine", null, null, "/MACHINE:X86");

            return(map);
        }
示例#2
0
        /// <summary>
        /// Creates a mapping between configuration properties for the Visual
        /// C++ linker and corresponding command-line arguments.
        /// </summary>
        /// <returns>
        /// A mapping between configuration properties for the Visual C++
        /// linker and corresponding command-line arguments.
        /// </returns>
        /// <remarks>
        ///   <para>
        ///   The following configuration properties are processed by
        ///   <see cref="VcProject" />:
        ///   </para>
        ///   <list type="table">
        ///     <listheader>
        ///       <term>Category</term>
        ///       <description>Property</description>
        ///     </listheader>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Output File (/OUT:[file])</description>
        ///     </item>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Additional Library Directories (/LIBPATH:[dir])</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Additional Dependencies</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Add Module to Assembly (/ASSEMBLYMODULE:file)</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Embed Managed Resource File (/ASSEMBLYRESOURCE:file)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Generate Debug Info (/DEBUG)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Generate Program Database File (/PDB:name)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Generate Map File (/MAP)</description>
        ///     </item>
        ///     <item>
        ///       <term>Debugging</term>
        ///       <description>Map File Name (/MAP:[filename])</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Heap Reserve Size (/HEAP:reserve)</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Heap Commit Size (/HEAP:reserve, commit)</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Stack Reserve Size (/STACK:reserve)</description>
        ///     </item>
        ///     <item>
        ///       <term>System</term>
        ///       <description>Stack Commit Size (/STACK:reserve, commit)</description>
        ///     </item>
        ///   </list>
        ///   <para>
        ///   The following configuration properties are ignored:
        ///   </para>
        ///   <list type="table">
        ///     <listheader>
        ///       <term>Category</term>
        ///       <description>Property</description>
        ///     </listheader>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Show Progress (/VERBOSE, /VERBOSE:LIB)</description>
        ///     </item>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Suppress Startup Banner (/NOLOGO)</description>
        ///     </item>
        ///   </list>
        ///   <para>
        ///   Support for the following configuration properties still needs to
        ///   be implemented:
        ///   </para>
        ///   <list type="table">
        ///     <listheader>
        ///       <term>Category</term>
        ///       <description>Property</description>
        ///     </listheader>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Ignore Import Library</description>
        ///     </item>
        ///     <item>
        ///       <term>General</term>
        ///       <description>Register Output</description>
        ///     </item>
        ///     <item>
        ///       <term>Input</term>
        ///       <description>Delay Loaded DLLs (/DELAYLOAD:[dll_name])</description>
        ///     </item>
        ///     <item>
        ///       <term>Embedded IDL</term>
        ///       <description>MIDL Commands (/MIDL:[file])</description>
        ///     </item>
        ///   </list>
        /// </remarks>
        public static VcArgumentMap CreateLinkerArgumentMap() {
            VcArgumentMap map = new VcArgumentMap();

            // General
            map.AddEnum("LinkIncremental", null, null, "/INCREMENTAL:NO", "/INCREMENTAL");
            map.AddLinkerString("Version", "/VERSION:", true);

            // Input
            map.AddBool("IgnoreAllDefaultLibraries", "/NODEFAULTLIB");
            map.AddQuotedLinkerString("ModuleDefinitionFile", "/DEF:", true);

            // Debugging
            map.AddQuotedLinkerString("StripPrivateSymbols", "/PDBSTRIPPED:", true);
            map.AddBool("MapExports", "/MAPINFO:EXPORTS");
            map.AddBool("MapLines", "/MAPINFO:LINES");
            map.AddEnum("AssemblyDebug", null, null, "/ASSEMBLYDEBUG", "/ASSEMBLYDEBUG:DISABLE");
            
            // System
            map.AddEnum("SubSystem", "/SUBSYSTEM:", null, "CONSOLE", "WINDOWS");
            map.AddEnum("LargeAddressAware", null, null, "/LARGEADDRESSAWARE:NO", "/LARGEADDRESSAWARE");
            map.AddEnum("TerminalServerAware", null, null, "/TSAWARE:NO", "/TSAWARE");
            map.AddBool("SwapRunFromCD", "/SWAPRUN:CD");
            map.AddBool("SwapRunFromNet", "/SWAPRUN:NET");

            // Optimization
            map.AddEnum("OptimizeReferences", "/OPT:", null, "NOREF", "REF");
            map.AddEnum("EnableCOMDATFolding", "/OPT:", null, "NOICF", "ICF");
            map.AddEnum("OptimizeForWindows98", "/OPT:", null, "NOWIN98", "WIN98");
            map.AddQuotedLinkerString("FunctionOrder", "/ORDER:", true);

            // Embedded IDL
            map.AddBool("IgnoreEmbeddedIDL", "/IGNOREIDL");
            map.AddQuotedLinkerString("MergedIDLBaseFileName", "/IDLOUT:", true);
            map.AddQuotedLinkerString("TypeLibraryFile", "/TLBOUT:", true);
            map.AddLinkerString("TypeLibraryResourceID", "/TLBID:");
            
            // Advanced
            map.AddQuotedLinkerString("EntryPointSymbol", "/ENTRY:", true);
            map.AddBool("ResourceOnlyDLL", "/NOENTRY");
            map.AddBool("SetChecksum", "/RELEASE");
            map.AddQuotedLinkerString("BaseAddress", "/BASE:", true);
            map.AddEnum("FixedBaseAddress", null, null, "/FIXED:NO", "/FIXED");
            map.AddBool("TurnOffAssemblyGeneration", "/NOASSEMBLY");
            map.AddBool("SupportUnloadOfDelayLoadedDLL", "/DELAY:UNLOAD");
            map.AddQuotedLinkerString("MergeSections", "/MERGE:", true);
            map.AddEnum("TargetMachine", null, null, "/MACHINE:X86");

            return map;
        }