Merge pull request #665 from gkhanna79/FixILCSDK
Fix the trimming of terminating slashes when computing ILCSDKPath
This commit is contained in:
commit
f1d9503a6e
5 changed files with 7 additions and 15 deletions
|
@ -65,6 +65,11 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
||||||
config.IlcSdkPath = IlcSdkPath;
|
config.IlcSdkPath = IlcSdkPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get the directory name to ensure there are no trailing slashes as they may conflict
|
||||||
|
// with the terminating " we suffix to account for paths with spaces in them.
|
||||||
|
char[] charsToTrim = {'\\', '/'};
|
||||||
|
config.IlcSdkPath = config.IlcSdkPath.TrimEnd(charsToTrim);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(LogPath))
|
if (!string.IsNullOrEmpty(LogPath))
|
||||||
{
|
{
|
||||||
config.LogPath = LogPath;
|
config.LogPath = LogPath;
|
||||||
|
|
|
@ -67,10 +67,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
||||||
|
|
||||||
// TODO: Enable this when https://github.com/dotnet/cli/pull/469 goes through.
|
// TODO: Enable this when https://github.com/dotnet/cli/pull/469 goes through.
|
||||||
// var ilcSdkIncPath = Path.Combine(config.IlcSdkPath, "inc");
|
// var ilcSdkIncPath = Path.Combine(config.IlcSdkPath, "inc");
|
||||||
//
|
var ilcSdkIncPath = config.IlcSdkPath;
|
||||||
// Get the directory name to ensure there are no trailing slashes as they may conflict
|
|
||||||
// with the terminating " we suffix to account for paths with spaces in them.
|
|
||||||
var ilcSdkIncPath = Path.GetDirectoryName(config.IlcSdkPath);
|
|
||||||
argsList.Add("-I");
|
argsList.Add("-I");
|
||||||
argsList.Add($"\"{ilcSdkIncPath}\"");
|
argsList.Add($"\"{ilcSdkIncPath}\"");
|
||||||
|
|
||||||
|
|
|
@ -95,9 +95,6 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
||||||
var libOut = DetermineOutputFile(config);
|
var libOut = DetermineOutputFile(config);
|
||||||
argsList.Add($"-o \"{libOut}\"");
|
argsList.Add($"-o \"{libOut}\"");
|
||||||
|
|
||||||
// Add Stubs
|
|
||||||
argsList.Add(Path.Combine(config.AppDepSDKPath, "CPPSdk/ubuntu.14.04/lxstubs.cpp"));
|
|
||||||
|
|
||||||
this.CompilerArgStr = string.Join(" ", argsList);
|
this.CompilerArgStr = string.Join(" ", argsList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,10 +69,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
||||||
|
|
||||||
// TODO: Enable this when https://github.com/dotnet/cli/pull/469 goes through.
|
// TODO: Enable this when https://github.com/dotnet/cli/pull/469 goes through.
|
||||||
// var ilcSdkIncPath = Path.Combine(config.IlcSdkPath, "inc");
|
// var ilcSdkIncPath = Path.Combine(config.IlcSdkPath, "inc");
|
||||||
//
|
var ilcSdkIncPath = config.IlcSdkPath;
|
||||||
// Get the directory name to ensure there are no trailing slashes as they may conflict
|
|
||||||
// with the terminating " we suffix to account for paths with spaces in them.
|
|
||||||
var ilcSdkIncPath = Path.GetDirectoryName(config.IlcSdkPath);
|
|
||||||
argsList.Add("-I");
|
argsList.Add("-I");
|
||||||
argsList.Add($"\"{ilcSdkIncPath}\"");
|
argsList.Add($"\"{ilcSdkIncPath}\"");
|
||||||
|
|
||||||
|
|
|
@ -71,11 +71,7 @@ namespace Microsoft.DotNet.Tools.Compiler.Native
|
||||||
//
|
//
|
||||||
// TODO: Enable this when https://github.com/dotnet/cli/pull/469 goes through.
|
// TODO: Enable this when https://github.com/dotnet/cli/pull/469 goes through.
|
||||||
// var ilcSdkIncPath = Path.Combine(config.IlcSdkPath, "inc");
|
// var ilcSdkIncPath = Path.Combine(config.IlcSdkPath, "inc");
|
||||||
//
|
|
||||||
// Get the directory name to ensure there are no trailing slashes as they may conflict
|
|
||||||
// with the terminating " we suffix to account for paths with spaces in them.
|
|
||||||
var ilcSdkIncPath = config.IlcSdkPath;
|
var ilcSdkIncPath = config.IlcSdkPath;
|
||||||
ilcSdkIncPath = ilcSdkIncPath.TrimEnd(new char[] {'\\'});
|
|
||||||
argsList.Add("/I");
|
argsList.Add("/I");
|
||||||
argsList.Add($"\"{ilcSdkIncPath}\"");
|
argsList.Add($"\"{ilcSdkIncPath}\"");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue