From 790204b39c4c2813b6e868a7cb0b73ada8d766d6 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 8 Sep 2021 10:53:46 -0700 Subject: [PATCH] Move native pgo into a targets file instead of being a separate project to be more static-graph friendly. --- eng/nativepgo.targets | 56 ++++++++++++++++ .../.nuget/optdata/Directory.Build.props | 4 -- .../.nuget/optdata/Directory.Build.targets | 4 -- src/coreclr/.nuget/optdata/optdata.proj | 67 ------------------- src/coreclr/runtime-prereqs.proj | 4 +- src/coreclr/runtime.proj | 18 ++--- 6 files changed, 63 insertions(+), 90 deletions(-) create mode 100644 eng/nativepgo.targets delete mode 100644 src/coreclr/.nuget/optdata/Directory.Build.props delete mode 100644 src/coreclr/.nuget/optdata/Directory.Build.targets delete mode 100644 src/coreclr/.nuget/optdata/optdata.proj diff --git a/eng/nativepgo.targets b/eng/nativepgo.targets new file mode 100644 index 0000000000000..1a5d22e94436d --- /dev/null +++ b/eng/nativepgo.targets @@ -0,0 +1,56 @@ + + + true + true + false + false + + <_NativeOptimizationDataPackageTarget>$(TargetOS.ToLower())-$(TargetArchitecture.ToLower()) + <_NativeOptimizationDataPackageTarget Condition="'$(TargetOS)' == 'windows'">windows_nt-$(TargetArchitecture.ToLower()) + + + + + + + + + + + + + + + + + + + + Pkgoptimization_$(_NativeOptimizationDataPackageTarget)_PGO_CoreCLR + + + + + + + $(%(Identity)) + + + + + @(PgoPackagePathPropertyItemList->'%(PgoPackagePath)') + + + + + + + + + diff --git a/src/coreclr/.nuget/optdata/Directory.Build.props b/src/coreclr/.nuget/optdata/Directory.Build.props deleted file mode 100644 index 4ac51105d96d4..0000000000000 --- a/src/coreclr/.nuget/optdata/Directory.Build.props +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/coreclr/.nuget/optdata/Directory.Build.targets b/src/coreclr/.nuget/optdata/Directory.Build.targets deleted file mode 100644 index 18aaf2d3aabf4..0000000000000 --- a/src/coreclr/.nuget/optdata/Directory.Build.targets +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/coreclr/.nuget/optdata/optdata.proj b/src/coreclr/.nuget/optdata/optdata.proj deleted file mode 100644 index ba49b5f84e793..0000000000000 --- a/src/coreclr/.nuget/optdata/optdata.proj +++ /dev/null @@ -1,67 +0,0 @@ - - - - $(NetCoreAppCurrent) - - True - True - - - win7-x64;win7-x86;linux-x64 - true - <_TargetOSArchLowercase>$(TargetOS.ToLower())-$(TargetArchitecture.ToLower()) - <_TargetOSArchLowercase Condition="'$(TargetOS)' == 'windows'">windows_nt-$(TargetArchitecture.ToLower()) - - - - - - - - - - - - - - - - - - - Pkgoptimization_$(_TargetOSArchLowercase)_PGO_CoreCLR - - - - - - - $(%(Identity)) - - - - - @(PgoPackagePathPropertyItemList->'%(PgoPackagePath)') - - - - - - - - - - - - - diff --git a/src/coreclr/runtime-prereqs.proj b/src/coreclr/runtime-prereqs.proj index d5fa8a1fec9c5..feabb4fff5f9a 100644 --- a/src/coreclr/runtime-prereqs.proj +++ b/src/coreclr/runtime-prereqs.proj @@ -6,11 +6,11 @@ - + - + diff --git a/src/coreclr/runtime.proj b/src/coreclr/runtime.proj index 1e972b6dc85b0..2765ff402f722 100644 --- a/src/coreclr/runtime.proj +++ b/src/coreclr/runtime.proj @@ -8,19 +8,11 @@ + + - - - - - - - <_CoreClrBuildArg Condition="'$(TargetArchitecture)' != ''" Include="-$(TargetArchitecture)" /> <_CoreClrBuildArg Condition="!$([MSBuild]::IsOsPlatform(Windows)) and '$(CMakeArgs)' != ''" Include="$(CMakeArgs)" /> @@ -37,14 +29,14 @@ ('$(TargetArchitecture)' == 'x86' or '$(TargetArchitecture)' == 'x64') and '$(Configuration)' == 'Release' and '$(ClrRuntimeSubset)' == 'true' and - '$(NoPgoOptimize)' != 'true' and + '$(NativeOptimizationDataSupported)' == 'true' and '$(PgoInstrument)' != 'true'" Include="-enforcepgo" /> <_CoreClrBuildArg Condition="$([MSBuild]::IsOsPlatform(Windows)) and '$(CrossDac)' != ''" Include="-$(CrossDac)dac" /> <_CoreClrBuildArg Condition="'$(Ninja)' == 'true' and !$([MSBuild]::IsOsPlatform(Windows))" Include="-ninja" /> <_CoreClrBuildArg Condition="'$(Ninja)' == 'false' and $([MSBuild]::IsOsPlatform(Windows))" Include="-msbuild" /> <_CoreClrBuildArg Condition="'$(PgoInstrument)' == 'true'" Include="-pgoinstrument" /> - <_CoreClrBuildArg Condition="'$(NoPgoOptimize)' != 'true' and '$(PgoInstrument)' != 'true'" Include="-pgodatapath "$(PgoDataPath)"" /> + <_CoreClrBuildArg Condition="'$(NativeOptimizationDataSupported)' == 'true' and '$(PgoInstrument)' != 'true'" Include="-pgodatapath "$(PgoPackagePath)"" />