merge rel/1.0.0-preview2 into rel/1.0.0
This commit is contained in:
commit
d717b84ec8
397 changed files with 12555 additions and 2190 deletions
|
@ -7,6 +7,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
public class DependencyVersions
|
||||
{
|
||||
public static readonly string CoreCLRVersion = "1.0.2-rc3-24201-00";
|
||||
public static readonly string CoreCLRVersion = "1.0.2";
|
||||
public static readonly string JitVersion = "1.0.2";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,12 +11,13 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public class Crossgen
|
||||
{
|
||||
private string _coreClrVersion;
|
||||
private string _jitVersion;
|
||||
private string _crossGenPath;
|
||||
private static readonly string[] s_excludedLibraries =
|
||||
private static readonly string[] s_excludedLibraries =
|
||||
{
|
||||
"mscorlib.dll",
|
||||
"mscorlib.ni.dll",
|
||||
"System.Private.CoreLib",
|
||||
"System.Private.CoreLib.dll",
|
||||
"System.Private.CoreLib.ni.dll"
|
||||
};
|
||||
|
||||
|
@ -25,9 +26,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// in CompileTargets and the one in the shared library project.json match and are updated in lock step, but long term
|
||||
// we need to be able to look at the project.lock.json file and figure out what version of Microsoft.NETCore.Runtime.CoreCLR
|
||||
// was used, and then select that version.
|
||||
public Crossgen(string coreClrVersion)
|
||||
public Crossgen(string coreClrVersion, string jitVersion)
|
||||
{
|
||||
_coreClrVersion = coreClrVersion;
|
||||
_jitVersion = jitVersion;
|
||||
_crossGenPath = GetCrossgenPathForVersion();
|
||||
}
|
||||
|
||||
|
@ -48,21 +50,59 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
private string GetLibCLRJitPathForVersion()
|
||||
{
|
||||
var coreclrRid = GetCoreCLRRid();
|
||||
var crossgenPackagePath = GetCrossGenPackagePathForVersion();
|
||||
var jitRid = GetCoreCLRRid();
|
||||
var jitPackagePath = GetJitPackagePathForVersion();
|
||||
|
||||
if (crossgenPackagePath == null)
|
||||
if (jitPackagePath == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return Path.Combine(
|
||||
crossgenPackagePath,
|
||||
jitPackagePath,
|
||||
"runtimes",
|
||||
coreclrRid,
|
||||
jitRid,
|
||||
"native",
|
||||
$"{Constants.DynamicLibPrefix}clrjit{Constants.DynamicLibSuffix}");
|
||||
}
|
||||
}
|
||||
|
||||
private string GetJitPackagePathForVersion()
|
||||
{
|
||||
string jitRid = GetCoreCLRRid();
|
||||
|
||||
if (jitRid == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string packageId = $"runtime.{jitRid}.Microsoft.NETCore.Jit";
|
||||
|
||||
return Path.Combine(
|
||||
Dirs.NuGetPackages,
|
||||
packageId,
|
||||
_jitVersion);
|
||||
}
|
||||
|
||||
private string GetCoreLibsDirForVersion()
|
||||
{
|
||||
string coreclrRid = GetCoreCLRRid();
|
||||
|
||||
if (coreclrRid == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string packageId = $"runtime.{coreclrRid}.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
|
||||
return Path.Combine(
|
||||
Dirs.NuGetPackages,
|
||||
packageId,
|
||||
_coreClrVersion,
|
||||
"runtimes",
|
||||
coreclrRid,
|
||||
"lib",
|
||||
"netstandard1.0");
|
||||
}
|
||||
|
||||
private string GetCrossGenPackagePathForVersion()
|
||||
{
|
||||
|
@ -73,7 +113,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return null;
|
||||
}
|
||||
|
||||
string packageId = $"runtime.{coreclrRid}.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
string packageId = $"runtime.{coreclrRid}.Microsoft.NETCore.Runtime.CoreCLR";
|
||||
|
||||
return Path.Combine(
|
||||
Dirs.NuGetPackages,
|
||||
|
@ -89,34 +129,23 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
var arch = RuntimeEnvironment.RuntimeArchitecture;
|
||||
rid = $"win7-{arch}";
|
||||
}
|
||||
else if (CurrentPlatform.IsUbuntu)
|
||||
{
|
||||
rid = $"ubuntu.{RuntimeEnvironment.OperatingSystemVersion}-x64";
|
||||
}
|
||||
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL)
|
||||
{
|
||||
// CentOS runtime is in the runtime.rhel.7-x64... package.
|
||||
rid = "rhel.7-x64";
|
||||
}
|
||||
else if (CurrentPlatform.IsOSX)
|
||||
{
|
||||
rid = "osx.10.10-x64";
|
||||
}
|
||||
else if (CurrentPlatform.IsDebian)
|
||||
else if (CurrentPlatform.IsCentOS || CurrentPlatform.IsRHEL)
|
||||
{
|
||||
rid = "debian.8-x64";
|
||||
// CentOS runtime is in the runtime.rhel.7-x64... package as are all
|
||||
// versions of RHEL
|
||||
rid = "rhel.7-x64";
|
||||
}
|
||||
else if (CurrentPlatform.IsFedora)
|
||||
else if (CurrentPlatform.IsLinux)
|
||||
{
|
||||
rid = $"fedora.{RuntimeEnvironment.OperatingSystemVersion}-x64";
|
||||
}
|
||||
else if (CurrentPlatform.IsOpenSuse)
|
||||
{
|
||||
rid = $"opensuse.{RuntimeEnvironment.OperatingSystemVersion}-x64";
|
||||
rid = RuntimeEnvironment.GetRuntimeIdentifier();
|
||||
}
|
||||
|
||||
return rid;
|
||||
}
|
||||
}
|
||||
|
||||
public void CrossgenDirectory(string sharedFxPath, string pathToAssemblies)
|
||||
{
|
||||
|
@ -137,10 +166,12 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
// The right fix -
|
||||
// If the assembly has deps.json then parse the json file to get all the dependencies, pass these dependencies as input to crossgen.
|
||||
// else pass the current directory of assembly as input to crossgen.
|
||||
var coreLibsDir = GetCoreLibsDirForVersion();
|
||||
var addtionalPaths = Directory.GetDirectories(pathToAssemblies, "*", SearchOption.AllDirectories).ToList();
|
||||
var paths = new List<string>() { sharedFxPath, pathToAssemblies };
|
||||
var paths = new List<string>() { coreLibsDir, sharedFxPath, pathToAssemblies };
|
||||
paths.AddRange(addtionalPaths);
|
||||
var platformAssembliesPaths = string.Join(Path.PathSeparator.ToString(), paths.Distinct());
|
||||
var jitPath = GetLibCLRJitPathForVersion();
|
||||
|
||||
var env = new Dictionary<string, string>()
|
||||
{
|
||||
|
@ -152,7 +183,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
string fileName = Path.GetFileName(file);
|
||||
|
||||
if (s_excludedLibraries.Any(lib => String.Equals(lib, fileName, StringComparison.OrdinalIgnoreCase))
|
||||
if (s_excludedLibraries.Any(lib => String.Equals(lib, fileName, StringComparison.OrdinalIgnoreCase))
|
||||
|| !PEUtils.HasMetadata(file))
|
||||
{
|
||||
continue;
|
||||
|
@ -165,11 +196,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
"-platform_assemblies_paths", platformAssembliesPaths
|
||||
};
|
||||
|
||||
if (CurrentPlatform.IsUnix)
|
||||
{
|
||||
crossgenArgs.Add("-JITPath");
|
||||
crossgenArgs.Add(GetLibCLRJitPathForVersion());
|
||||
}
|
||||
crossgenArgs.Add("-JITPath");
|
||||
crossgenArgs.Add(jitPath);
|
||||
|
||||
ExecSilent(_crossGenPath, crossgenArgs, env);
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
RuntimeEnvironment.GetRuntimeIdentifier());
|
||||
|
||||
public static readonly string Intermediate = Path.Combine(Output, "intermediate");
|
||||
public static readonly string PackagesIntermediate = Path.Combine(Output, "packages/intermediate");
|
||||
public static readonly string PackagesNoRID = Path.Combine(RepoRoot, "artifacts", "packages");
|
||||
public static readonly string Packages = Path.Combine(Output, "packages");
|
||||
public static readonly string Stage1 = Path.Combine(Output, "stage1");
|
||||
|
@ -45,11 +44,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
private static string GetNuGetPackagesDir()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
{
|
||||
return Path.Combine(Environment.GetEnvironmentVariable("USERPROFILE"), ".nuget", "packages");
|
||||
}
|
||||
return Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".nuget", "packages");
|
||||
return Path.Combine(Dirs.RepoRoot, ".nuget", "packages");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public Command Pack(params string[] args) => Exec("pack", args);
|
||||
public Command Test(params string[] args) => Exec("test", args);
|
||||
public Command Publish(params string[] args) => Exec("publish", args);
|
||||
public Command New(params string[] args) => Exec("new", args);
|
||||
|
||||
public string GetRuntimeId()
|
||||
{
|
||||
|
|
|
@ -10,9 +10,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
public class Monikers
|
||||
{
|
||||
public const string SharedFrameworkName = "Microsoft.NETCore.App";
|
||||
public const string CLISdkBrandName = "Microsoft .NET Core 1.0.0 RC2 - SDK Preview 1";
|
||||
public const string SharedFxBrandName = "Microsoft .NET Core 1.0.0 RC2 - Runtime";
|
||||
public const string SharedHostBrandName = "Microsoft .NET Core 1.0.0 RC2 - Host";
|
||||
public const string CLISdkBrandName = "Microsoft .NET Core 1.0.0 - SDK Preview 2";
|
||||
public const string SharedFxBrandName = "Microsoft .NET Core 1.0.0 - Runtime";
|
||||
public const string SharedHostBrandName = "Microsoft .NET Core 1.0.0 - Host";
|
||||
public const string HostFxrBrandName = "Microsoft .NET Core 1.0.0 - Host FX Resolver";
|
||||
|
||||
public static string GetProductMoniker(BuildTargetContext c, string artifactPrefix, string version)
|
||||
{
|
||||
|
@ -45,6 +46,11 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return $"{CurrentPlatform.Current}_{CurrentArchitecture.Current}";
|
||||
}
|
||||
|
||||
public static string GetDebianHostFxrPackageName(string hostFxrNugetVersion)
|
||||
{
|
||||
return $"dotnet-hostfxr-{hostFxrNugetVersion}".ToLower();
|
||||
}
|
||||
|
||||
public static string GetDebianSharedFrameworkPackageName(string sharedFrameworkNugetVersion)
|
||||
{
|
||||
return $"dotnet-sharedframework-{SharedFrameworkName}-{sharedFrameworkNugetVersion}".ToLower();
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
private string _corehostLockedDirectory;
|
||||
private string _corehostLatestDirectory;
|
||||
|
||||
private Crossgen _crossgenUtil = new Crossgen(DependencyVersions.CoreCLRVersion);
|
||||
private Crossgen _crossgenUtil = new Crossgen(DependencyVersions.CoreCLRVersion, DependencyVersions.JitVersion);
|
||||
private string _corehostPackageSource;
|
||||
|
||||
public SharedFrameworkPublisher(
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
public class VersionRepoUpdater
|
||||
{
|
||||
private static Regex s_nugetFileRegex = new Regex("^(.*?)\\.(([0-9]+\\.)?[0-9]+\\.[0-9]+(-([A-z0-9-]+))?)\\.nupkg$");
|
||||
private static Regex s_nugetFileRegex = new Regex("^(?<id>.*?)\\.(?<version>([0-9]+\\.)?[0-9]+\\.[0-9]+(-(?<prerelease>[A-z0-9-]+))?)(?<symbols>\\.symbols)?\\.nupkg$");
|
||||
|
||||
private string _gitHubAuthToken;
|
||||
private string _gitHubUser;
|
||||
|
@ -68,12 +68,16 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
Match match = s_nugetFileRegex.Match(Path.GetFileName(filePath));
|
||||
|
||||
packages.Add(new NuGetPackageInfo()
|
||||
// only look for non-symbols packages
|
||||
if (string.IsNullOrEmpty(match.Groups["symbols"].Value))
|
||||
{
|
||||
Id = match.Groups[1].Value,
|
||||
Version = match.Groups[2].Value,
|
||||
Prerelease = match.Groups[5].Value,
|
||||
});
|
||||
packages.Add(new NuGetPackageInfo()
|
||||
{
|
||||
Id = match.Groups["id"].Value,
|
||||
Version = match.Groups["version"].Value,
|
||||
Prerelease = match.Groups["prerelease"].Value,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return packages;
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
"version": "1.0.0-*",
|
||||
"description": "Build scripts for dotnet-cli",
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.6.0-rc3-24201-00",
|
||||
"Microsoft.CSharp": "4.0.1-rc3-24201-00",
|
||||
"System.Dynamic.Runtime": "4.0.11-rc3-24201-00",
|
||||
"System.Reflection.Metadata": "1.3.0-rc3-24201-00",
|
||||
"System.Runtime.Serialization.Primitives": "4.1.1-rc3-24201-00",
|
||||
"System.Xml.XmlSerializer": "4.0.11-rc3-24201-00",
|
||||
"NETStandard.Library": "1.6.0",
|
||||
"Microsoft.CSharp": "4.0.1",
|
||||
"System.Dynamic.Runtime": "4.0.11",
|
||||
"System.Reflection.Metadata": "1.3.0",
|
||||
"System.Runtime.Serialization.Primitives": "4.1.1",
|
||||
"System.Xml.XmlSerializer": "4.0.11",
|
||||
"WindowsAzure.Storage": "6.2.2-preview",
|
||||
"Microsoft.DotNet.Cli.Build.Framework": {
|
||||
"target": "project"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue