-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move native pgo into a targets file instead of being a separate proje…
…ct to be more static-graph friendly.
- Loading branch information
1 parent
5fbd69e
commit 790204b
Showing
6 changed files
with
63 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<NativeOptimizationDataSupported Condition="'$(TargetOS)' == 'windows' And ('$(TargetArchitecture)' == 'x64' Or '$(TargetArchitecture)' == 'x86')">true</NativeOptimizationDataSupported> | ||
<NativeOptimizationDataSupported Condition="'$(TargetOS)' == 'Linux' And '$(TargetArchitecture)' == 'x64'">true</NativeOptimizationDataSupported> | ||
<NativeOptimizationDataSupported Condition="'$(NoPgoOptimize)' == 'true'">false</NativeOptimizationDataSupported> | ||
<NativeOptimizationDataSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeOptimizationDataSupported> | ||
|
||
<_NativeOptimizationDataPackageTarget>$(TargetOS.ToLower())-$(TargetArchitecture.ToLower())</_NativeOptimizationDataPackageTarget> | ||
<_NativeOptimizationDataPackageTarget Condition="'$(TargetOS)' == 'windows'">windows_nt-$(TargetArchitecture.ToLower())</_NativeOptimizationDataPackageTarget> | ||
|
||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="optimization.$(_NativeOptimizationDataPackageTarget).PGO.CoreCLR" | ||
Version="$(optimizationPGOCoreCLRVersion)" | ||
Condition="'$(optimizationPGOCoreCLRVersion)'!='' And '$(NativeOptimizationDataSupported)'!=''" | ||
GeneratePathProperty="true" /> | ||
</ItemGroup> | ||
|
||
|
||
<!-- --> | ||
<!-- Task: GetPgoDataPackagePath --> | ||
<!-- --> | ||
<!-- Notes: --> | ||
<!-- --> | ||
<!-- DumpPgoDataPackagePath is used to get the path of the native PGO data --> | ||
<!-- for other MSBuild projects, generally to pass to another project or --> | ||
<!-- native script like build-runtime.cmd/sh. --> | ||
<!-- --> | ||
|
||
<Target Name="GetPgoDataPackagePath" Returns="$(PgoPackagePath)"> | ||
<PropertyGroup> | ||
<PgoPackagePathProperty>Pkgoptimization_$(_NativeOptimizationDataPackageTarget)_PGO_CoreCLR</PgoPackagePathProperty> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Use an item group for expansion of $($(PgoPackagePathProperty)) (an illegal MSBuild expression) | ||
i.e. the prop value's value. | ||
--> | ||
<ItemGroup> | ||
<PgoPackagePathPropertyItemList Include="$(PgoPackagePathProperty)" /> | ||
<PgoPackagePathPropertyItemList> | ||
<PgoPackagePath>$(%(Identity))</PgoPackagePath> | ||
</PgoPackagePathPropertyItemList> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<PgoPackagePath>@(PgoPackagePathPropertyItemList->'%(PgoPackagePath)')</PgoPackagePath> | ||
</PropertyGroup> | ||
|
||
<Error Condition="!Exists('$(PgoPackagePath)') And '$(NativeOptimizationDataSupported)' == 'true'" Text="Unable to locate restored PGO package at $(PgoPackagePath). Maybe the platform-specific package naming changed?" /> | ||
</Target> | ||
|
||
<Target Name="OutputPgoPathForCI" Condition="'$(ContinuousIntegrationBuild)' == 'true' and '$(NativeOptimizationDataSupported)' == 'true'" DependsOnTargets="GetPgoDataPackagePath"> | ||
<Message Text="##vso[task.setvariable variable=CoreClrPgoDataArg]-pgodatapath "$(PgoPackagePath)"" /> | ||
</Target> | ||
</Project> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters