Fix a consistency issue with command line parsing of file names (use FileInfo instead...
authorFadi Hanna <fadim@microsoft.com>
Wed, 5 Feb 2020 19:16:09 +0000 (14:16 -0500)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 19:16:09 +0000 (14:16 -0500)
* Fix a consistency issue with command line parsing of file names (use FileInfo instead of string)

src/coreclr/src/tools/crossgen2/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilationBuilder.cs
src/coreclr/src/tools/crossgen2/crossgen2/CommandLineOptions.cs

index e022ba5..bacab9d 100644 (file)
@@ -4,7 +4,7 @@
 
 using System;
 using System.Collections.Generic;
-
+using System.IO;
 using ILCompiler.DependencyAnalysis;
 using ILCompiler.DependencyAnalysis.ReadyToRun;
 using ILCompiler.DependencyAnalysisFramework;
@@ -78,9 +78,9 @@ namespace ILCompiler
             return _ilProvider;
         }
 
-        public ReadyToRunCodegenCompilationBuilder UseJitPath(string jitPath)
+        public ReadyToRunCodegenCompilationBuilder UseJitPath(FileInfo jitPath)
         {
-            _jitPath = jitPath;
+            _jitPath = jitPath == null ? null : jitPath.FullName;
             return this;
         }
 
index 59cef24..9240f6e 100644 (file)
@@ -26,7 +26,7 @@ namespace ILCompiler
 
         public string TargetArch { get; set; }
         public string TargetOS { get; set; }
-        public string JitPath { get; set; }
+        public FileInfo JitPath { get; set; }
         public string SystemModule { get; set; }
         public bool WaitForDebugger { get; set; }
         public bool Tuning { get; set; }
@@ -136,7 +136,7 @@ namespace ILCompiler
                 },
                 new Option(new[] { "--jitpath" }, "Path to JIT compiler library") 
                 { 
-                    Argument =  new Argument<string>() 
+                    Argument =  new Argument<FileInfo>() 
                 },
                 new Option(new[] { "--singlemethodtypename" }, "Single method compilation: name of the owning type") 
                 {