Change ILToNative Path to ilcpath
This commit is contained in:
parent
17232e836d
commit
3c0b0ce73c
4 changed files with 14 additions and 15 deletions
|
@ -116,7 +116,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
public string IlcArgs { get; set; }
|
||||
public List<string> LinkLibPaths { get; set; }
|
||||
public string AppDepSDKPath { get; set; }
|
||||
public string ILToNativePath { get; set; }
|
||||
public string IlcPath { get; set; }
|
||||
public string RuntimeLibPath { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
{
|
||||
public class ILCompilerInvoker
|
||||
{
|
||||
//private readonly string ExecutableName = "ILToNative" + Constants.ExeSuffix;
|
||||
private readonly string ExecutableName = "corerun" + Constants.ExeSuffix;
|
||||
private readonly string ILCompiler = "ilc.exe";
|
||||
|
||||
|
@ -41,7 +40,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
{
|
||||
var argsList = new List<string>();
|
||||
|
||||
var managedPath = Path.Combine(config.ILToNativePath, ILCompiler);
|
||||
var managedPath = Path.Combine(config.IlcPath, ILCompiler);
|
||||
argsList.Add(managedPath);
|
||||
|
||||
// Input File
|
||||
|
@ -49,7 +48,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
argsList.Add(inputFilePath);
|
||||
|
||||
// System.Private.CoreLib Reference
|
||||
var coreLibPath = Path.Combine(config.ILToNativePath, OSCoreLibNameMap[config.OS]);
|
||||
var coreLibPath = Path.Combine(config.IlcPath, OSCoreLibNameMap[config.OS]);
|
||||
argsList.Add($"-r \"{coreLibPath}\"");
|
||||
|
||||
// Dependency References
|
||||
|
@ -79,7 +78,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
|
||||
public int Invoke(NativeCompileSettings config)
|
||||
{
|
||||
var executablePath = Path.Combine(config.ILToNativePath, ExecutableName);
|
||||
var executablePath = Path.Combine(config.IlcPath, ExecutableName);
|
||||
|
||||
var result = Command.Create(executablePath, ArgStr)
|
||||
.ForwardStdErr()
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
.Execute();
|
||||
|
||||
// Needs System.Native.so in output
|
||||
var sharedLibPath = Path.Combine(config.ILToNativePath, "System.Native.so");
|
||||
var sharedLibPath = Path.Combine(config.IlcPath, "System.Native.so");
|
||||
var outputSharedLibPath = Path.Combine(config.OutputDirectory, "System.Native.so");
|
||||
try
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
|
||||
// Custom Extensibility Points to support CoreRT workflow TODO better descriptions
|
||||
var ilcArgs = app.Option("--ilcargs <CODEGEN>", "Use to specify custom arguments for the IL Compiler.", CommandOptionType.SingleValue);
|
||||
var iltonativePathArg = app.Option("--iltonative-path <ILTONATIVE>", "Use to plug in a custom built iltonative.exe", CommandOptionType.SingleValue);
|
||||
var ilcPathArg = app.Option("--ilcpath <ILC_PATH>", "Use to plug in a custom built ilc.exe", CommandOptionType.SingleValue);
|
||||
var runtimeLibPathArg = app.Option("--runtimelib-path <LIB_PATH>", "Use to plug in custom runtime and bootstrapper libs.", CommandOptionType.SingleValue);
|
||||
var linklibArg = app.Option("--linklib <LINKLIB>", "Use to link in additional static libs", CommandOptionType.MultipleValue);
|
||||
|
||||
|
@ -120,7 +120,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
NativeMode = modeArg.Value(),
|
||||
ReferencePaths = referencesArg.Values,
|
||||
IlcArgs = ilcArgs.Value(),
|
||||
ILToNativePath = iltonativePathArg.Value(),
|
||||
IlcPath = ilcPathArg.Value(),
|
||||
RuntimeLibPath = runtimeLibPathArg.Value(),
|
||||
LinkLibPaths = linklibArg.Values,
|
||||
AppDepSDKPath = appdepSDKPathArg.Value(),
|
||||
|
@ -247,19 +247,19 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
config.ReferencePaths.Add(reference);
|
||||
}
|
||||
|
||||
// ILToNativePath
|
||||
if (!string.IsNullOrEmpty(args.ILToNativePath))
|
||||
// IlcPath
|
||||
if (!string.IsNullOrEmpty(args.IlcPath))
|
||||
{
|
||||
if (!Directory.Exists(args.ILToNativePath))
|
||||
if (!Directory.Exists(args.IlcPath))
|
||||
{
|
||||
throw new Exception("ILToNative Directory does not exist.");
|
||||
throw new Exception("ILC Directory does not exist.");
|
||||
}
|
||||
|
||||
config.ILToNativePath = args.ILToNativePath;
|
||||
config.IlcPath = args.IlcPath;
|
||||
}
|
||||
else
|
||||
{
|
||||
config.ILToNativePath = GetDefaultILToNativePath();
|
||||
config.IlcPath = GetDefaultIlcPath();
|
||||
}
|
||||
|
||||
// RuntimeLibPath
|
||||
|
@ -340,7 +340,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
|||
return dir;
|
||||
}
|
||||
|
||||
private static string GetDefaultILToNativePath()
|
||||
private static string GetDefaultIlcPath()
|
||||
{
|
||||
return AppContext.BaseDirectory;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue