diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index c4868c14788be3..ac8bc4d738efdc 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -40,14 +40,14 @@
https://github.com/dotnet/llvm-project
da5dd054a531e6fea65643b7e754285b73eab433
-
+
https://github.com/dotnet/command-line-api
- feb61c7f328a2401d74f4317b39d02126cfdfe24
+ 48bd86bdcd926a194e1581a60d820d12a64ef3c6
-
+
https://github.com/dotnet/command-line-api
- feb61c7f328a2401d74f4317b39d02126cfdfe24
+ 48bd86bdcd926a194e1581a60d820d12a64ef3c6
diff --git a/eng/Versions.props b/eng/Versions.props
index 637481059e52c5..4b0185cff0c168 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -179,7 +179,7 @@
2.0.0
17.10.0-beta1.24272.1
- 2.0.0-beta4.24528.1
+ 2.0.0-beta5.25208.1
3.1.16
2.1.0
2.0.3
diff --git a/src/coreclr/tools/Common/CommandLineHelpers.cs b/src/coreclr/tools/Common/CommandLineHelpers.cs
index 7f93e48a8949f6..ef60fe2d27ff05 100644
--- a/src/coreclr/tools/Common/CommandLineHelpers.cs
+++ b/src/coreclr/tools/Common/CommandLineHelpers.cs
@@ -24,11 +24,11 @@ internal static partial class Helpers
{
public const string DefaultSystemModule = "System.Private.CoreLib";
- public static Dictionary BuildPathDictionary(IReadOnlyList tokens, bool strict)
+ public static Dictionary BuildPathDictionary(IReadOnlyList tokens, bool strict)
{
Dictionary dictionary = new(StringComparer.OrdinalIgnoreCase);
- foreach (CliToken token in tokens)
+ foreach (Token token in tokens)
{
AppendExpandedPaths(dictionary, token.Value, strict);
}
@@ -36,11 +36,11 @@ public static Dictionary BuildPathDictionary(IReadOnlyList BuildPathList(IReadOnlyList tokens)
+ public static List BuildPathList(IReadOnlyList tokens)
{
List paths = new();
Dictionary dictionary = new(StringComparer.OrdinalIgnoreCase);
- foreach (CliToken token in tokens)
+ foreach (Token token in tokens)
{
AppendExpandedPaths(dictionary, token.Value, false);
foreach (string file in dictionary.Values)
@@ -115,7 +115,7 @@ public static TargetArchitecture GetTargetArchitecture(string token)
}
}
- public static CliRootCommand UseVersion(this CliRootCommand command)
+ public static RootCommand UseVersion(this RootCommand command)
{
for (int i = 0; i < command.Options.Count; i++)
{
@@ -129,9 +129,9 @@ public static CliRootCommand UseVersion(this CliRootCommand command)
return command;
}
- public static CliRootCommand UseExtendedHelp(this CliRootCommand command, Func>> customizer)
+ public static RootCommand UseExtendedHelp(this RootCommand command, Func>> customizer)
{
- foreach (CliOption option in command.Options)
+ foreach (Option option in command.Options)
{
if (option is HelpOption helpOption)
{
@@ -209,7 +209,7 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath,
Dictionary outputToReproPackageFileName = new();
List rspFile = new List();
- foreach (CliOption option in res.CommandResult.Command.Options)
+ foreach (Option option in res.CommandResult.Command.Options)
{
OptionResult optionResult = res.GetResult(option);
if (optionResult is null || option.Name == "--make-repro-path")
@@ -266,7 +266,7 @@ public static void MakeReproPackage(string makeReproPath, string outputFilePath,
}
}
- foreach (CliArgument argument in res.CommandResult.Command.Arguments)
+ foreach (Argument argument in res.CommandResult.Command.Arguments)
{
ArgumentResult argumentResult = res.GetResult(argument);
if (argumentResult is null)
diff --git a/src/coreclr/tools/ILVerify/ILVerifyRootCommand.cs b/src/coreclr/tools/ILVerify/ILVerifyRootCommand.cs
index 9f5eac54af8e2c..62e1aecba47b24 100644
--- a/src/coreclr/tools/ILVerify/ILVerifyRootCommand.cs
+++ b/src/coreclr/tools/ILVerify/ILVerifyRootCommand.cs
@@ -8,33 +8,33 @@
namespace ILVerify
{
- internal sealed class ILVerifyRootCommand : CliRootCommand
+ internal sealed class ILVerifyRootCommand : RootCommand
{
- public CliArgument> InputFilePath { get; } =
+ public Argument> InputFilePath { get; } =
new("input-file-path") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, true), Description = "Input file(s)", Arity = ArgumentArity.OneOrMore };
- public CliOption> Reference { get; } =
+ public Option> Reference { get; } =
new("--reference", "-r") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, false), DefaultValueFactory = result => Helpers.BuildPathDictionary(result.Tokens, false), Description = "Reference metadata from the specified assembly" };
- public CliOption SystemModule { get; } =
+ public Option SystemModule { get; } =
new("--system-module", "-s") { Description = "System module name (default: mscorlib)" };
- public CliOption SanityChecks { get; } =
+ public Option SanityChecks { get; } =
new("--sanity-checks", "-c") { Description = "Check for valid constructs that are likely mistakes" };
- public CliOption Include { get; } =
+ public Option Include { get; } =
new("--include", "-i") { Description = "Use only methods/types/namespaces, which match the given regular expression(s)" };
- public CliOption IncludeFile { get; } =
- new CliOption("--include-file") { Description = "Same as --include, but the regular expression(s) are declared line by line in the specified file." }.AcceptExistingOnly();
- public CliOption Exclude { get; } =
+ public Option IncludeFile { get; } =
+ new Option("--include-file") { Description = "Same as --include, but the regular expression(s) are declared line by line in the specified file." }.AcceptExistingOnly();
+ public Option Exclude { get; } =
new("--exclude", "-e") { Description = "Skip methods/types/namespaces, which match the given regular expression(s)" };
- public CliOption ExcludeFile { get; } =
- new CliOption("--exclude-file") { Description = "Same as --exclude, but the regular expression(s) are declared line by line in the specified file." }.AcceptExistingOnly();
- public CliOption IgnoreError { get; } =
+ public Option ExcludeFile { get; } =
+ new Option("--exclude-file") { Description = "Same as --exclude, but the regular expression(s) are declared line by line in the specified file." }.AcceptExistingOnly();
+ public Option IgnoreError { get; } =
new("--ignore-error", "-g") { Description = "Ignore errors, which match the given regular expression(s)" };
- public CliOption IgnoreErrorFile { get; } =
- new CliOption("--ignore-error-file") { Description = "Same as --ignore-error, but the regular expression(s) are declared line by line in the specified file." }.AcceptExistingOnly();
- public CliOption Statistics { get; } =
+ public Option IgnoreErrorFile { get; } =
+ new Option("--ignore-error-file") { Description = "Same as --ignore-error, but the regular expression(s) are declared line by line in the specified file." }.AcceptExistingOnly();
+ public Option Statistics { get; } =
new("--statistics") { Description = "Print verification statistics" };
- public CliOption Verbose { get; } =
+ public Option Verbose { get; } =
new("--verbose") { Description = "Verbose output" };
- public CliOption Tokens { get; } =
+ public Option Tokens { get; } =
new("--tokens", "-t") { Description = "Include metadata tokens in error messages" };
public ParseResult Result;
diff --git a/src/coreclr/tools/ILVerify/Program.cs b/src/coreclr/tools/ILVerify/Program.cs
index 7dd39082a0c0e4..eae57d8bfd752d 100644
--- a/src/coreclr/tools/ILVerify/Program.cs
+++ b/src/coreclr/tools/ILVerify/Program.cs
@@ -475,11 +475,11 @@ public PEReader Resolve(string simpleName)
return null;
}
- private T Get(CliOption option) => _command.Result.GetValue(option);
- private T Get(CliArgument argument) => _command.Result.GetValue(argument);
+ private T Get(Option option) => _command.Result.GetValue(option);
+ private T Get(Argument argument) => _command.Result.GetValue(argument);
private static int Main(string[] args) =>
- new CliConfiguration(new ILVerifyRootCommand().UseVersion())
+ new CommandLineConfiguration(new ILVerifyRootCommand().UseVersion())
{
ResponseFileTokenReplacer = Helpers.TryReadResponseFile,
EnableDefaultExceptionHandler = false,
diff --git a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
index cca4dddc14669f..60c2616d9f261c 100644
--- a/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
+++ b/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs
@@ -11,167 +11,167 @@
namespace ILCompiler
{
- internal sealed class ILCompilerRootCommand : CliRootCommand
+ internal sealed class ILCompilerRootCommand : RootCommand
{
- public CliArgument> InputFilePaths { get; } =
+ public Argument> InputFilePaths { get; } =
new("input-file-path") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, true), Description = "Input file(s)", Arity = ArgumentArity.OneOrMore };
- public CliOption> ReferenceFiles { get; } =
+ public Option> ReferenceFiles { get; } =
new("--reference", "-r") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, false), DefaultValueFactory = result => Helpers.BuildPathDictionary(result.Tokens, false), Description = "Reference file(s) for compilation" };
- public CliOption OutputFilePath { get; } =
+ public Option OutputFilePath { get; } =
new("--out", "-o") { Description = "Output file path" };
- public CliOption Optimize { get; } =
+ public Option Optimize { get; } =
new("--optimize", "-O") { Description = "Enable optimizations" };
- public CliOption OptimizeSpace { get; } =
+ public Option OptimizeSpace { get; } =
new("--optimize-space", "--Os") { Description = "Enable optimizations, favor code space" };
- public CliOption OptimizeTime { get; } =
+ public Option OptimizeTime { get; } =
new("--optimize-time", "--Ot") { Description = "Enable optimizations, favor code speed" };
- public CliOption MibcFilePaths { get; } =
+ public Option MibcFilePaths { get; } =
new("--mibc", "-m") { DefaultValueFactory = _ => Array.Empty(), Description = "Mibc file(s) for profile guided optimization" };
- public CliOption SatelliteFilePaths { get; } =
+ public Option SatelliteFilePaths { get; } =
new("--satellite") { DefaultValueFactory = _ => Array.Empty(), Description = "Satellite assemblies associated with inputs/references" };
- public CliOption EnableDebugInfo { get; } =
+ public Option EnableDebugInfo { get; } =
new("--debug", "-g") { Description = "Emit debugging information" };
- public CliOption UseDwarf5 { get; } =
+ public Option UseDwarf5 { get; } =
new("--gdwarf-5") { Description = "Generate source-level debug information with dwarf version 5" };
- public CliOption NativeLib { get; } =
+ public Option NativeLib { get; } =
new("--nativelib") { Description = "Compile as static or shared library" };
- public CliOption SplitExeInitialization { get; } =
+ public Option SplitExeInitialization { get; } =
new("--splitinit") { Description = "Split initialization of an executable between the library entrypoint and a main entrypoint" };
- public CliOption ExportsFile { get; } =
+ public Option ExportsFile { get; } =
new("--exportsfile") { Description = "File to write exported symbol and method definitions" };
- public CliOption ExportUnmanagedEntryPoints { get; } =
+ public Option ExportUnmanagedEntryPoints { get; } =
new("--export-unmanaged-entrypoints") { Description = "Controls whether the named UnmanagedCallersOnly methods are exported" };
- public CliOption ExportDynamicSymbols { get; } =
+ public Option ExportDynamicSymbols { get; } =
new("--export-dynamic-symbol") { Description = "Add dynamic export symbol to exports file" };
- public CliOption DgmlLogFileName { get; } =
+ public Option DgmlLogFileName { get; } =
new("--dgmllog") { Description = "Save result of dependency analysis as DGML" };
- public CliOption GenerateFullDgmlLog { get; } =
+ public Option GenerateFullDgmlLog { get; } =
new("--fulllog") { Description = "Save detailed log of dependency analysis" };
- public CliOption ScanDgmlLogFileName { get; } =
+ public Option ScanDgmlLogFileName { get; } =
new("--scandgmllog") { Description = "Save result of scanner dependency analysis as DGML" };
- public CliOption GenerateFullScanDgmlLog { get; } =
+ public Option GenerateFullScanDgmlLog { get; } =
new("--scanfulllog") { Description = "Save detailed log of scanner dependency analysis" };
- public CliOption IsVerbose { get; } =
+ public Option IsVerbose { get; } =
new("--verbose") { Description = "Enable verbose logging" };
- public CliOption SystemModuleName { get; } =
+ public Option SystemModuleName { get; } =
new("--systemmodule") { DefaultValueFactory = _ => Helpers.DefaultSystemModule, Description = "System module name (default: System.Private.CoreLib)" };
- public CliOption Win32ResourceModuleName { get; } =
+ public Option Win32ResourceModuleName { get; } =
new("--win32resourcemodule") { Description = "Name of the module from which to copy Win32 resources (Windows target only)" };
- public CliOption MultiFile { get; } =
+ public Option MultiFile { get; } =
new("--multifile") { Description = "Compile only input files (do not compile referenced assemblies)" };
- public CliOption WaitForDebugger { get; } =
+ public Option WaitForDebugger { get; } =
new("--waitfordebugger") { Description = "Pause to give opportunity to attach debugger" };
- public CliOption Resilient { get; } =
+ public Option Resilient { get; } =
new("--resilient") { Description = "Ignore unresolved types, methods, and assemblies. Defaults to false" };
- public CliOption CodegenOptions { get; } =
+ public Option CodegenOptions { get; } =
new("--codegenopt") { DefaultValueFactory = _ => Array.Empty(), Description = "Define a codegen option" };
- public CliOption RdXmlFilePaths { get; } =
+ public Option RdXmlFilePaths { get; } =
new("--rdxml") { DefaultValueFactory = _ => Array.Empty(), Description = "RD.XML file(s) for compilation" };
- public CliOption LinkTrimFilePaths { get; } =
+ public Option LinkTrimFilePaths { get; } =
new("--descriptor") { DefaultValueFactory = _ => Array.Empty(), Description = "ILLink.Descriptor file(s) for compilation" };
- public CliOption SubstitutionFilePaths { get; } =
+ public Option SubstitutionFilePaths { get; } =
new("--substitution") { DefaultValueFactory = _ => Array.Empty(), Description = "ILLink.Substitution file(s) for compilation" };
- public CliOption MapFileName { get; } =
+ public Option MapFileName { get; } =
new("--map") { Description = "Generate a map file" };
- public CliOption MstatFileName { get; } =
+ public Option MstatFileName { get; } =
new("--mstat") { Description = "Generate an mstat file" };
- public CliOption SourceLinkFileName { get; } =
+ public Option SourceLinkFileName { get; } =
new("--sourcelink") { Description = "Generate a SourceLink file" };
- public CliOption MetadataLogFileName { get; } =
+ public Option MetadataLogFileName { get; } =
new("--metadatalog") { Description = "Generate a metadata log file" };
- public CliOption CompleteTypesMetadata { get; } =
+ public Option CompleteTypesMetadata { get; } =
new("--completetypemetadata") { Description = "Generate complete metadata for types" };
- public CliOption ReflectionData { get; } =
+ public Option ReflectionData { get; } =
new("--reflectiondata") { Description = "Reflection data to generate (one of: all, none)" };
- public CliOption ScanReflection { get; } =
+ public Option ScanReflection { get; } =
new("--scanreflection") { Description = "Scan IL for reflection patterns" };
- public CliOption UseScanner { get; } =
+ public Option UseScanner { get; } =
new("--scan") { Description = "Use IL scanner to generate optimized code (implied by -O)" };
- public CliOption NoScanner { get; } =
+ public Option NoScanner { get; } =
new("--noscan") { Description = "Do not use IL scanner to generate optimized code" };
- public CliOption IlDump { get; } =
+ public Option IlDump { get; } =
new("--ildump") { Description = "Dump IL assembly listing for compiler-generated IL" };
- public CliOption NoInlineTls { get; } =
+ public Option NoInlineTls { get; } =
new("--noinlinetls") { Description = "Do not generate inline thread local statics" };
- public CliOption EmitStackTraceData { get; } =
+ public Option EmitStackTraceData { get; } =
new("--stacktracedata") { Description = "Emit data to support generating stack trace strings at runtime" };
- public CliOption MethodBodyFolding { get; } =
+ public Option MethodBodyFolding { get; } =
new("--methodbodyfolding") { Description = "Fold identical method bodies" };
- public CliOption InitAssemblies { get; } =
+ public Option InitAssemblies { get; } =
new("--initassembly") { DefaultValueFactory = _ => Array.Empty(), Description = "Assembly(ies) with a library initializer" };
- public CliOption FeatureSwitches { get; } =
+ public Option FeatureSwitches { get; } =
new("--feature") { DefaultValueFactory = _ => Array.Empty(), Description = "Feature switches to apply (format: 'Namespace.Name=[true|false]'" };
- public CliOption RuntimeOptions { get; } =
+ public Option RuntimeOptions { get; } =
new("--runtimeopt") { DefaultValueFactory = _ => Array.Empty(), Description = "Runtime options to set" };
- public CliOption RuntimeKnobs { get; } =
+ public Option RuntimeKnobs { get; } =
new("--runtimeknob") { DefaultValueFactory = _ => Array.Empty(), Description = "Runtime knobs to set" };
- public CliOption Parallelism { get; } =
+ public Option Parallelism { get; } =
new("--parallelism") { CustomParser = MakeParallelism, DefaultValueFactory = MakeParallelism, Description = "Maximum number of threads to use during compilation" };
- public CliOption InstructionSet { get; } =
+ public Option InstructionSet { get; } =
new("--instruction-set") { Description = "Instruction set to allow or disallow" };
- public CliOption MaxVectorTBitWidth { get; } =
+ public Option MaxVectorTBitWidth { get; } =
new("--max-vectort-bitwidth") { Description = "Maximum width, in bits, that Vector is allowed to be" };
- public CliOption Guard { get; } =
+ public Option Guard { get; } =
new("--guard") { Description = "Enable mitigations. Options: 'cf': CFG (Control Flow Guard, Windows only)" };
- public CliOption Dehydrate { get; } =
+ public Option Dehydrate { get; } =
new("--dehydrate") { Description = "Dehydrate runtime data structures" };
- public CliOption PreinitStatics { get; } =
+ public Option PreinitStatics { get; } =
new("--preinitstatics") { Description = "Interpret static constructors at compile time if possible (implied by -O)" };
- public CliOption NoPreinitStatics { get; } =
+ public Option NoPreinitStatics { get; } =
new("--nopreinitstatics") { Description = "Do not interpret static constructors at compile time" };
- public CliOption InstrumentReachability { get; } =
+ public Option InstrumentReachability { get; } =
new("--reachabilityinstrument") { Description = "Instrument code for dynamic reachability" };
- public CliOption UseReachability { get; } =
+ public Option UseReachability { get; } =
new("--reachabilityuse") { Description = "Use dynamic reachability instrumentation data to produce minimal output" };
- public CliOption SuppressedWarnings { get; } =
+ public Option SuppressedWarnings { get; } =
new("--nowarn") { DefaultValueFactory = _ => Array.Empty(), Description = "Disable specific warning messages" };
- public CliOption SingleWarn { get; } =
+ public Option SingleWarn { get; } =
new("--singlewarn") { Description = "Generate single AOT/trimming warning per assembly" };
- public CliOption NoTrimWarn { get; } =
+ public Option NoTrimWarn { get; } =
new("--notrimwarn") { Description = "Disable warnings related to trimming" };
- public CliOption NoAotWarn { get; } =
+ public Option NoAotWarn { get; } =
new("--noaotwarn") { Description = "Disable warnings related to AOT" };
- public CliOption SingleWarnEnabledAssemblies { get; } =
+ public Option SingleWarnEnabledAssemblies { get; } =
new("--singlewarnassembly") { DefaultValueFactory = _ => Array.Empty(), Description = "Generate single AOT/trimming warning for given assembly" };
- public CliOption SingleWarnDisabledAssemblies { get; } =
+ public Option SingleWarnDisabledAssemblies { get; } =
new("--nosinglewarnassembly") { DefaultValueFactory = _ => Array.Empty(), Description = "Expand AOT/trimming warnings for given assembly" };
- public CliOption TreatWarningsAsErrors { get; } =
+ public Option TreatWarningsAsErrors { get; } =
new("--warnaserror") { Description = "Treat warnings as errors" };
- public CliOption WarningsAsErrorsEnable { get; } =
+ public Option WarningsAsErrorsEnable { get; } =
new("--warnaserr") { Description = "Enable treating specific warnings as errors" };
- public CliOption WarningsAsErrorsDisable { get; } =
+ public Option WarningsAsErrorsDisable { get; } =
new("--nowarnaserr") { Description = "Disable treating specific warnings as errors" };
- public CliOption DirectPInvokes { get; } =
+ public Option DirectPInvokes { get; } =
new("--directpinvoke") { DefaultValueFactory = _ => Array.Empty(), Description = "PInvoke to call directly" };
- public CliOption DirectPInvokeLists { get; } =
+ public Option DirectPInvokeLists { get; } =
new("--directpinvokelist") { DefaultValueFactory = _ => Array.Empty(), Description = "File with list of PInvokes to call directly" };
- public CliOption RootedAssemblies { get; } =
+ public Option RootedAssemblies { get; } =
new("--root") { DefaultValueFactory = _ => Array.Empty(), Description = "Fully generate given assembly" };
- public CliOption ConditionallyRootedAssemblies { get; } =
+ public Option ConditionallyRootedAssemblies { get; } =
new("--conditionalroot") { DefaultValueFactory = _ => Array.Empty(), Description = "Fully generate given assembly if it's used" };
- public CliOption TrimmedAssemblies { get; } =
+ public Option TrimmedAssemblies { get; } =
new("--trim") { DefaultValueFactory = _ => Array.Empty(), Description = "Trim the specified assembly" };
- public CliOption RootDefaultAssemblies { get; } =
+ public Option RootDefaultAssemblies { get; } =
new("--defaultrooting") { Description = "Root assemblies that are not marked [IsTrimmable]" };
- public CliOption TargetArchitecture { get; } =
+ public Option TargetArchitecture { get; } =
new("--targetarch") { CustomParser = MakeTargetArchitecture, DefaultValueFactory = MakeTargetArchitecture, Description = "Target architecture for cross compilation", HelpName = "arg" };
- public CliOption TargetOS { get; } =
+ public Option TargetOS { get; } =
new("--targetos") { CustomParser = result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null), DefaultValueFactory = result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null), Description = "Target OS for cross compilation", HelpName = "arg" };
- public CliOption JitPath { get; } =
+ public Option JitPath { get; } =
new("--jitpath") { Description = "Path to JIT compiler library" };
- public CliOption SingleMethodTypeName { get; } =
+ public Option SingleMethodTypeName { get; } =
new("--singlemethodtypename") { Description = "Single method compilation: assembly-qualified name of the owning type" };
- public CliOption SingleMethodName { get; } =
+ public Option SingleMethodName { get; } =
new("--singlemethodname") { Description = "Single method compilation: name of the method" };
- public CliOption MaxGenericCycleDepth { get; } =
+ public Option MaxGenericCycleDepth { get; } =
new("--maxgenericcycle") { DefaultValueFactory = _ => CompilerTypeSystemContext.DefaultGenericCycleDepthCutoff, Description = "Max depth of generic cycle" };
- public CliOption MaxGenericCycleBreadth { get; } =
+ public Option MaxGenericCycleBreadth { get; } =
new("--maxgenericcyclebreadth") { DefaultValueFactory = _ => CompilerTypeSystemContext.DefaultGenericCycleBreadthCutoff, Description = "Max breadth of generic cycle expansion" };
- public CliOption SingleMethodGenericArgs { get; } =
+ public Option SingleMethodGenericArgs { get; } =
new("--singlemethodgenericarg") { Description = "Single method compilation: generic arguments to the method" };
- public CliOption MakeReproPath { get; } =
+ public Option MakeReproPath { get; } =
new("--make-repro-path") { Description = "Path where to place a repro package" };
- public CliOption UnmanagedEntryPointsAssemblies { get; } =
+ public Option UnmanagedEntryPointsAssemblies { get; } =
new("--generateunmanagedentrypoints") { DefaultValueFactory = _ => Array.Empty(), Description = "Generate unmanaged entrypoints for a given assembly" };
public OptimizationMode OptimizationMode { get; private set; }
diff --git a/src/coreclr/tools/aot/ILCompiler/Program.cs b/src/coreclr/tools/aot/ILCompiler/Program.cs
index e9e7daa9691bad..0420a555eb3c5f 100644
--- a/src/coreclr/tools/aot/ILCompiler/Program.cs
+++ b/src/coreclr/tools/aot/ILCompiler/Program.cs
@@ -784,10 +784,10 @@ private static IEnumerable ProcessWarningCodes(IEnumerable warningC
}
}
- private T Get(CliOption option) => _command.Result.GetValue(option);
+ private T Get(Option option) => _command.Result.GetValue(option);
private static int Main(string[] args) =>
- new CliConfiguration(new ILCompilerRootCommand(args)
+ new CommandLineConfiguration(new ILCompilerRootCommand(args)
.UseVersion()
.UseExtendedHelp(ILCompilerRootCommand.GetExtendedHelp))
{
diff --git a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
index 64b78d35500ac5..c70d226212b6ec 100644
--- a/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
+++ b/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs
@@ -13,136 +13,136 @@
namespace ILCompiler
{
- internal class Crossgen2RootCommand : CliRootCommand
+ internal class Crossgen2RootCommand : RootCommand
{
- public CliArgument> InputFilePaths { get; } =
+ public Argument> InputFilePaths { get; } =
new("input-file-path") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, true), Description = "Input file(s)", Arity = ArgumentArity.OneOrMore };
- public CliOption> UnrootedInputFilePaths { get; } =
+ public Option> UnrootedInputFilePaths { get; } =
new("--unrooted-input-file-paths", "-u") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, true), DefaultValueFactory = result => Helpers.BuildPathDictionary(result.Tokens, true), Description = SR.UnrootedInputFilesToCompile };
- public CliOption> ReferenceFilePaths { get; } =
+ public Option> ReferenceFilePaths { get; } =
new("--reference", "-r") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, false), DefaultValueFactory = result => Helpers.BuildPathDictionary(result.Tokens, false), Description = SR.ReferenceFiles };
- public CliOption InstructionSet { get; } =
+ public Option InstructionSet { get; } =
new("--instruction-set") { Description = SR.InstructionSets };
- public CliOption