Merge remote-tracking branch 'upstream/release/2.0.0' into merges/release/2.0.0-to-release/15.5-20171107-080033
This commit is contained in:
commit
1fef760409
4 changed files with 78 additions and 28 deletions
|
@ -21,14 +21,14 @@
|
|||
<HostMonikerRid Condition=" '$(HostMonikerRid)' == '' ">$(HostOSName)-$(Architecture)</HostMonikerRid>
|
||||
|
||||
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
|
||||
<ArtifactNameSdkDebug>dotnet-sdk-debug</ArtifactNameSdkDebug>
|
||||
<ArtifactNameSdkSymbols>dotnet-sdk-symbols</ArtifactNameSdkSymbols>
|
||||
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameSdkLanguagePack>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack</ArtifactNameSdkLanguagePack>
|
||||
|
||||
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
|
||||
<ArtifactNameWithVersionMSBuildExtensions>dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionMSBuildExtensions>
|
||||
|
||||
<ArtifactNameWithVersionSdkDebug>$(ArtifactNameSdkDebug)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkDebug>
|
||||
<ArtifactNameWithVersionSdkSymbols>$(ArtifactNameSdkSymbols)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkSymbols>
|
||||
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
<ArtifactNameWithVersionSdkLanguagePack>$(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkLanguagePack>
|
||||
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(HostMonikerRid)</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SdkDebugLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkDebug)</SdkDebugLayoutOutputDirectory>
|
||||
<SdkSymbolsLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkSymbols)</SdkSymbolsLayoutOutputDirectory>
|
||||
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
|
||||
<SdkLanguagePackOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkLanguagePack)</SdkLanguagePackOutputDirectory>
|
||||
<SatelliteAssemblies>*.resources.dll</SatelliteAssemblies>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<!-- Set up Items with Layout Input Files -->
|
||||
<ItemGroup>
|
||||
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
|
||||
<SdkDebugLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
|
||||
<SdkSymbolsLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
|
||||
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
|
||||
<SdkLanguagePackInput Include="$(OutputDirectory)/sdk/**/$(SatelliteAssemblies)" />
|
||||
|
||||
|
@ -30,9 +30,10 @@
|
|||
<Output TaskParameter="RelativePath" ItemName="SdkRelativeOutputFiles" />
|
||||
</MakeRelative>
|
||||
<MakeRelative
|
||||
Path1="$(SymbolsDirectory)"
|
||||
Path2="%(SdkDebugLayoutInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="SdkDebugRelativeOutputFiles" />
|
||||
Condition="'$(SeparateSymbolsArchive)' != 'false'"
|
||||
Path1="$(SymbolsDirectory)/"
|
||||
Path2="%(SdkSymbolsLayoutInput.Identity)" >
|
||||
<Output TaskParameter="RelativePath" ItemName="SdkSymbolsRelativeOutputFiles" />
|
||||
</MakeRelative>
|
||||
<MakeRelative
|
||||
Path1="$(OutputDirectory)/"
|
||||
|
@ -70,11 +71,11 @@
|
|||
<Name>$(ArtifactNameSdk)</Name>
|
||||
</LayoutDefinition>
|
||||
|
||||
<LayoutDefinition Include="Debug">
|
||||
<InputFiles>@(SdkDebugLayoutInput)</InputFiles>
|
||||
<OutputFiles>@(SdkDebugRelativeOutputFiles -> '$(SdkDebugLayoutOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionSdkDebug)</NameWithVersion>
|
||||
<Name>$(ArtifactNameSdkDebug)</Name>
|
||||
<LayoutDefinition Include="SdkSymbols" Condition="'$(SeparateSymbolsArchive)' != 'false'">
|
||||
<InputFiles>@(SdkSymbolsLayoutInput)</InputFiles>
|
||||
<OutputFiles>@(SdkSymbolsRelativeOutputFiles -> '$(SdkSymbolsLayoutOutputDirectory)/%(Identity)')</OutputFiles>
|
||||
<NameWithVersion>$(ArtifactNameWithVersionSdkSymbols)</NameWithVersion>
|
||||
<Name>$(ArtifactNameSdkSymbols)</Name>
|
||||
</LayoutDefinition>
|
||||
|
||||
<LayoutDefinition Include="CombinedHostHostFxrFrameworkSdk">
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
|
@ -22,12 +24,18 @@ namespace Microsoft.DotNet.Build.Tasks
|
|||
|
||||
public string CrossgenPath { get; set; }
|
||||
|
||||
public bool CreateSymbols { get; set; }
|
||||
|
||||
public string DiasymReaderPath { get; set; }
|
||||
|
||||
public bool ReadyToRun { get; set; }
|
||||
|
||||
public ITaskItem[] PlatformAssemblyPaths { get; set; }
|
||||
|
||||
private string TempOutputPath { get; set; }
|
||||
|
||||
private bool _secondInvocationToCreateSymbols;
|
||||
|
||||
protected override bool ValidateParameters()
|
||||
{
|
||||
base.ValidateParameters();
|
||||
|
@ -58,6 +66,12 @@ namespace Microsoft.DotNet.Build.Tasks
|
|||
File.Delete(TempOutputPath);
|
||||
}
|
||||
|
||||
if (toolResult && CreateSymbols)
|
||||
{
|
||||
_secondInvocationToCreateSymbols = true;
|
||||
toolResult = base.Execute();
|
||||
}
|
||||
|
||||
return toolResult;
|
||||
}
|
||||
|
||||
|
@ -83,9 +97,30 @@ namespace Microsoft.DotNet.Build.Tasks
|
|||
|
||||
protected override string GenerateCommandLineCommands()
|
||||
{
|
||||
if (_secondInvocationToCreateSymbols)
|
||||
{
|
||||
return $"{GetReadyToRun()} {GetPlatformAssemblyPaths()} {GetDiasymReaderPath()} {GetCreateSymbols()}";
|
||||
}
|
||||
|
||||
return $"{GetReadyToRun()} {GetInPath()} {GetOutPath()} {GetPlatformAssemblyPaths()} {GetJitPath()}";
|
||||
}
|
||||
|
||||
private string GetCreateSymbols()
|
||||
{
|
||||
var option = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "-createpdb" : "-createperfmap";
|
||||
return $"{option} \"{Path.GetDirectoryName(DestinationPath)}\" \"{DestinationPath}\"";
|
||||
}
|
||||
|
||||
private string GetDiasymReaderPath()
|
||||
{
|
||||
if (string.IsNullOrEmpty(DiasymReaderPath))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $"-diasymreaderpath \"{DiasymReaderPath}\"";
|
||||
}
|
||||
|
||||
private string GetReadyToRun()
|
||||
{
|
||||
if (ReadyToRun)
|
||||
|
|
|
@ -123,7 +123,8 @@
|
|||
|
||||
<Delete Files="$(PublishDir)/$(TargetName).deps.json;
|
||||
$(PublishDir)/$(TargetName).runtimeconfig.json;
|
||||
$(PublishDir)/%(BundledToolProjects.Identity).dll" />
|
||||
$(PublishDir)/%(BundledToolProjects.Identity).dll;
|
||||
$(PublishDir)/%(BundledToolProjects.Identity).pdb" />
|
||||
|
||||
<ChangeEntryPointLibraryName
|
||||
DepsFile="$(PublishDir)/%(BundledTools.Identity).deps.json"
|
||||
|
@ -220,7 +221,7 @@
|
|||
|
||||
<Target Name="CrossgenPublishDir"
|
||||
Condition=" '$(DISABLE_CROSSGEN)' == '' "
|
||||
AfterTargets="PublishMSBuildExtensions">
|
||||
AfterTargets="GenerateCliRuntimeConfigurationFiles">
|
||||
<ItemGroup>
|
||||
<RoslynFiles Include="$(PublishDir)Roslyn\bincore\**\*" />
|
||||
<FSharpFiles Include="$(PublishDir)FSharp\**\*" Exclude="$(PublishDir)FSharp\FSharp.Build.dll" />
|
||||
|
@ -235,6 +236,13 @@
|
|||
|
||||
<!-- Don't try to CrossGen tasks and supporting DLLs compiled for .NET Framework -->
|
||||
<RemainingFiles Remove="$(PublishDir)Microsoft\Microsoft.NET.Build.Extensions\tools\net*\**\*" />
|
||||
|
||||
<!-- Don't crossgen satellite assemblies -->
|
||||
<RoslynFiles Remove="$(PublishDir)Roslyn\bincore\**\*.resources.dll" />
|
||||
<FSharpFiles Remove="$(PublishDir)FSharp\**\*.resources.dll" />
|
||||
<RemainingFiles Remove="$(PublishDir)**\*.resources.dll" />
|
||||
|
||||
<DiasymReaderPath Include="$(SharedFrameworkNameVersionPath)/Microsoft.DiaSymReader.Native.*.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<AddMetadataIsPE Items="@(RoslynFiles)">
|
||||
|
@ -265,12 +273,20 @@
|
|||
Glob="$(CrossgenPath)"
|
||||
Mode="u+x" />
|
||||
|
||||
<!-- Crossgen does not support generating symbols on Mac -->
|
||||
<PropertyGroup Condition="'$(CreateCrossgenSymbols)' == ''">
|
||||
<CreateCrossgenSymbols>true</CreateCrossgenSymbols>
|
||||
<CreateCrossgenSymbols Condition="'$(OSName)' == 'osx'">false</CreateCrossgenSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<Crossgen
|
||||
SourceAssembly="%(RoslynTargets.FullPath)"
|
||||
DestinationPath="%(RoslynTargets.FullPath)"
|
||||
JITPath="$(LibCLRJitPath)"
|
||||
CrossgenPath="$(CrossgenPath)"
|
||||
ReadyToRun="True"
|
||||
CreateSymbols="$(CreateCrossgenSymbols)"
|
||||
DiasymReaderPath="@(DiasymReaderPath)"
|
||||
PlatformAssemblyPaths="@(PlatformAssemblies);@(RoslynFolders);$(SharedFrameworkNameVersionPath)" />
|
||||
|
||||
<Crossgen
|
||||
|
@ -279,6 +295,8 @@
|
|||
JITPath="$(LibCLRJitPath)"
|
||||
CrossgenPath="$(CrossgenPath)"
|
||||
ReadyToRun="True"
|
||||
CreateSymbols="$(CreateCrossgenSymbols)"
|
||||
DiasymReaderPath="@(DiasymReaderPath)"
|
||||
PlatformAssemblyPaths="@(PlatformAssemblies);@(FSharpFolders);$(SharedFrameworkNameVersionPath)" />
|
||||
|
||||
<Crossgen
|
||||
|
@ -287,6 +305,8 @@
|
|||
JITPath="$(LibCLRJitPath)"
|
||||
CrossgenPath="$(CrossgenPath)"
|
||||
ReadyToRun="True"
|
||||
CreateSymbols="$(CreateCrossgenSymbols)"
|
||||
DiasymReaderPath="@(DiasymReaderPath)"
|
||||
PlatformAssemblyPaths="@(PlatformAssemblies);@(RemainingFolders);$(SharedFrameworkNameVersionPath)" />
|
||||
</Target>
|
||||
|
||||
|
@ -299,23 +319,16 @@
|
|||
<Chmod Mode="755" Glob="$(SdkOutputDirectory)/FSharp/RunFsc.sh" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CreateSymbolsDirectory"
|
||||
AfterTargets="CrossgenPublishDir">
|
||||
<Target Name="SeparateSymbolsFromPublishDir"
|
||||
AfterTargets="CrossgenPublishDir"
|
||||
Condition="'$(SeparateSymbolsArchive)' != 'false'">
|
||||
<ItemGroup>
|
||||
<_AllSdkFiles Include="$(PublishDir)/**/*" />
|
||||
<PdbsToMove Include="$(PublishDir)/**/*.pdb" />
|
||||
<PdbsToMove Include="$(PublishDir)/**/*.ni.*.map" />
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(_AllSdkFiles)"
|
||||
DestinationFiles="@(_AllSdkFiles->'$(SymbolsDirectory)/sdk/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RemovePdbsFromPublishDir"
|
||||
AfterTargets="CreateSymbolsDirectory">
|
||||
<ItemGroup>
|
||||
<PdbsToClean Include="$(PublishDir)/**/*.pdb" />
|
||||
</ItemGroup>
|
||||
|
||||
<Delete Files="@(PdbsToClean)" />
|
||||
<Move SourceFiles="@(PdbsToMove)"
|
||||
DestinationFiles="@(PdbsToMove->'$(SymbolsDirectory)/sdk/$(SdkVersion)/%(RecursiveDir)%(Filename)%(Extension)')" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PublishStage2WithBackwardsCompatibleRuntimes"
|
||||
|
@ -336,6 +349,7 @@
|
|||
</Target>
|
||||
|
||||
<Target Name="RetargetVSTestConsole"
|
||||
BeforeTargets="PublishStage2WithBackwardsCompatibleRuntimes"
|
||||
AfterTargets="Publish">
|
||||
<PropertyGroup>
|
||||
<VSTestRuntimeConfigPath>$(PublishDir)/vstest.console.runtimeconfig.json</VSTestRuntimeConfigPath>
|
||||
|
|
Loading…
Reference in a new issue