Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Arcade-provided IBCMerge support for System.Private.CoreLib. #2308

Merged
merged 4 commits into from
Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,15 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>d0bb63d2ec7060714e63ee4082fac48f2e57f3e2</Sha>
</Dependency>
<Dependency Name="optimization.IBC.CoreCLR" Version="99.99.99-master-20190716.1">
<Dependency Name="optimization.linux-x64.IBC.CoreFx" Version="99.99.99-master-20190716.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>d0bb63d2ec7060714e63ee4082fac48f2e57f3e2</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.IBC.CoreCLR" Version="99.99.99-master-20190716.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>d0bb63d2ec7060714e63ee4082fac48f2e57f3e2</Sha>
</Dependency>
<Dependency Name="optimization.linux-x64.IBC.CoreCLR" Version="99.99.99-master-20190716.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Sha>d0bb63d2ec7060714e63ee4082fac48f2e57f3e2</Sha>
</Dependency>
Expand Down
9 changes: 6 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<UsingToolIbcOptimization>true</UsingToolIbcOptimization>
<UsingToolXliff>false</UsingToolXliff>
<!-- Paths used during restore -->
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and '$(ConfigurationGroup)' == 'Release'">true</EnableNgenOptimization>
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and ('$(ConfigurationGroup)' == 'Release' or '$(Configuration)' == 'Release')">true</EnableNgenOptimization>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will soon be able to clean Configuration vs ConfigurationGroup up :)

<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
<XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir>
<!-- Blob storage container that has the "Latest" channel to publish to. -->
Expand Down Expand Up @@ -69,7 +69,9 @@
<NETStandardLibraryVersion>2.2.0-prerelease.19564.1</NETStandardLibraryVersion>
<!-- dotnet-optimization dependencies -->
<optimizationwindows_ntx64IBCCoreFxVersion>99.99.99-master-20190716.1</optimizationwindows_ntx64IBCCoreFxVersion>
<optimizationIBCCoreCLRVersion>99.99.99-master-20190716.1</optimizationIBCCoreCLRVersion>
<optimizationlinuxx64IBCCoreFxVersion>99.99.99-master-20190716.1</optimizationlinuxx64IBCCoreFxVersion>
<optimizationwindows_ntx64IBCCoreCLRVersion>99.99.99-master-20190716.1</optimizationwindows_ntx64IBCCoreCLRVersion>
<optimizationlinuxx64IBCCoreCLRVersion>99.99.99-master-20190716.1</optimizationlinuxx64IBCCoreCLRVersion>
<optimizationPGOCoreCLRVersion>99.99.99-master-20190716.1</optimizationPGOCoreCLRVersion>
<!-- Not auto-updated. -->
<MicrosoftTargetingPackPrivateWinRTVersion>1.0.5</MicrosoftTargetingPackPrivateWinRTVersion>
Expand Down Expand Up @@ -106,7 +108,8 @@
<MicrosoftPrivateIntellisensePackage>microsoft.private.intellisense</MicrosoftPrivateIntellisensePackage>
<MicrosoftDotNetXUnitConsoleRunnerPackage>Microsoft.DotNet.XUnitConsoleRunner</MicrosoftDotNetXUnitConsoleRunnerPackage>
<MicrosoftNETCoreAppPackage>Microsoft.NETCore.App</MicrosoftNETCoreAppPackage>
<optimizationIBCCoreCLRPackage>optimization.IBC.CoreCLR</optimizationIBCCoreCLRPackage>
<WindowsOptimizationIBCCoreCLRPackage>optimization.windows_nt-x64.IBC.CoreCLR</WindowsOptimizationIBCCoreCLRPackage>
<LinuxOptimizationIBCCoreCLRPackage>optimization.linux-x64.IBC.CoreCLR</LinuxOptimizationIBCCoreCLRPackage>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These property names seem oddly inconsistent with the names for the CoreFx packages, which have similar package names.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to keep the names a little more verbose about being IBC data instead of just "optimization data" since we also have the PGO data package for CoreCLR.

<optimizationPGOCoreCLRPackage>optimization.PGO.CoreCLR</optimizationPGOCoreCLRPackage>
<MicrosoftDotNetBuildTasksFeedPackage>Microsoft.DotNet.Build.Tasks.Feed</MicrosoftDotNetBuildTasksFeedPackage>
<MicrosoftNETCoreTargetsPackage>Microsoft.NETCore.Targets</MicrosoftNETCoreTargetsPackage>
Expand Down
4 changes: 2 additions & 2 deletions eng/codeOptimization.targets
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
Condition="'$(IsEligibleForNgenOptimization)' == 'true'"
BeforeTargets="CoreCompile">
<PropertyGroup>
<IbcOptimizationDataDir Condition="'$(OSGroup)' == 'Unix' or '$(OSGroup)' == 'Linux'">$(IbcOptimizationDataDir)$(LinuxCoreFxOptimizationDataPackage)\</IbcOptimizationDataDir>
<IbcOptimizationDataDir Condition="'$(OSGroup)' != 'Unix' and '$(OSGroup)' != 'Linux'">$(IbcOptimizationDataDir)$(WindowsCoreFxOptimizationDataPackage)\</IbcOptimizationDataDir>
<IbcOptimizationDataDir Condition="'$(OSGroup)' == 'Unix' or '$(OSGroup)' == 'Linux'">$(IbcOptimizationDataDir)Linux\</IbcOptimizationDataDir>
<IbcOptimizationDataDir Condition="'$(OSGroup)' != 'Unix' and '$(OSGroup)' != 'Linux'">$(IbcOptimizationDataDir)Windows\</IbcOptimizationDataDir>
</PropertyGroup>
<ItemGroup>
<_optimizationDataAssembly Include="$(IbcOptimizationDataDir)**\$(TargetFileName)" />
Expand Down
11 changes: 2 additions & 9 deletions eng/pipelines/coreclr/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,9 @@ jobs:
value: true
- name: officialBuildIdArg
value: ''
- name: ibcOptimizeArg
value: ''
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '-officialbuildid=$(Build.BuildNumber)'

# IBCMerge is currently Windows-only and x86/x64-only
- ${{ if and(eq(parameters.osGroup, 'Windows_NT'), or(eq(parameters.archType, 'x64'), eq(parameters.archType, 'x86'))) }}:
- name: ibcOptimizeArg
value: '-ibcoptimize'
- name: enforcePgoArg
value: ''
# The EnforcePGO script is only supported on Windows and is not supported on arm or arm64.
Expand Down Expand Up @@ -121,7 +114,7 @@ jobs:
# # Since our internal tools are behind an authenticated feed,
# # we need to use the DotNetCli AzDO task to restore from the feed using a service connection.
# # We can't do this from within the build, so we need to do this as a separate step.
- ${{ if and(and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')), eq(parameters.osGroup, 'Windows_NT')) }}:
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/pipelines/common/restore-internal-tools.yml
parameters:
installDotnet: true
Expand All @@ -131,7 +124,7 @@ jobs:
- script: $(coreClrRepoRootDir)build$(scriptExt) $(buildConfig) $(archType) $(crossArg) -ci -skipnuget $(clangArg) $(stripSymbolsArg) $(officialBuildIdArg)
displayName: Build product
- ${{ if eq(parameters.osGroup, 'Windows_NT') }}:
- script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build$(scriptExt) $(buildConfig) $(archType) -ci -skiptests -skipbuildpackages $(officialBuildIdArg) $(ibcOptimizeArg) $(enforcePgoArg)
- script: set __TestIntermediateDir=int&&$(coreClrRepoRootDir)build$(scriptExt) $(buildConfig) $(archType) -ci -skiptests -skipbuildpackages $(officialBuildIdArg) $(enforcePgoArg)
displayName: Build product

# Build native test components
Expand Down
19 changes: 13 additions & 6 deletions eng/restore/optimizationData.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,30 @@

<ItemGroup>
<IBCPackage Include="$(WindowsCoreFxOptimizationDataPackage)" Version="$(optimizationwindows_ntx64IBCCoreFxVersion)" />
<IBCPackage Include="$(LinuxCoreFxOptimizationDataPackage)" Version="$(optimizationwindows_ntx64IBCCoreFxVersion)" />
<IBCPackage Include="$(LinuxCoreFxOptimizationDataPackage)" Version="$(optimizationlinuxx64IBCCoreFxVersion)" />
<IBCPackage Include="$(WindowsOptimizationIBCCoreCLRPackage)" Version="$(optimizationwindows_ntx64IBCCoreCLRVersion)" />
<IBCPackage Include="$(LinuxOptimizationIBCCoreCLRPackage)" Version="$(optimizationlinuxx64IBCCoreCLRVersion)" />
<PackageReference Include="@(IBCPackage)" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>

<!-- IBC data packages don't follow NuGet conventions. -->
<Target Name="GetIBCData"
AfterTargets="Restore">

<ItemGroup>
<IBCPackage>
<PackagePath>$(NuGetPackageRoot)%(IBCPackage.Identity)\%(IBCPackage.Version)</PackagePath>
</IBCPackage>
<_optimizationDataSourceFile Include="%(IBCPackage.PackagePath)\**\*.dll;%(IBCPackage.PackagePath)\**\*.ibc" Package="%(IBCPackage.Identity)" />
<IBCPackage Condition="$([System.String]::new('%(Identity)').ToLower().Contains('windows_nt'))">
<SubdirectoryName>Windows</SubdirectoryName>
</IBCPackage>
<IBCPackage Condition="$([System.String]::new('%(Identity)').ToLower().Contains('linux'))">
<SubdirectoryName>Linux</SubdirectoryName>
</IBCPackage>
<_optimizationDataSourceFile Include="%(IBCPackage.PackagePath)\**\*.dll;%(IBCPackage.PackagePath)\**\*.ibc" SubdirectoryName="%(IBCPackage.SubdirectoryName)" />
</ItemGroup>

<Copy SourceFiles="@(_optimizationDataSourceFile)"
DestinationFiles="@(_optimizationDataSourceFile->'$(IbcOptimizationDataDir)%(Package)\%(RecursiveDir)%(Filename)%(Extension)')"
DestinationFiles="@(_optimizationDataSourceFile->'$(IbcOptimizationDataDir)%(SubdirectoryName)\%(RecursiveDir)%(Filename)%(Extension)')"
SkipUnchangedFiles="true"
UseHardlinksIfPossible="true" />

Expand Down
Loading