summaryrefslogtreecommitdiff
path: root/build.proj
diff options
context:
space:
mode:
authorDaniel Podder <dapodd@microsoft.com>2017-03-07 21:14:57 -0600
committerGitHub <noreply@github.com>2017-03-07 21:14:57 -0600
commit1a1fdb8fb0839832b64248582082c90e166b74b5 (patch)
tree6a73c698b34a9537c3f0a0773f71c166371eb927 /build.proj
parent32f10867031f0913a1bfc4e6bc159639369bf4bb (diff)
downloadcoreclr-1a1fdb8fb0839832b64248582082c90e166b74b5.tar.gz
coreclr-1a1fdb8fb0839832b64248582082c90e166b74b5.tar.bz2
coreclr-1a1fdb8fb0839832b64248582082c90e166b74b5.zip
Port Windows PGO support to master (#9985)
The bulk of this PR is a cherry-pick of commit fa02660 that shipped in release/1.1.0, updating the build system support for PGO to support consuming PGDs properly during release builds on Windows. Also included are the following new changes: * Skip restore of opdata if the requisite project.json is missing * If the optdata package restore fails, fail the build. * Add new build option: 'skiprestoreoptdata' Note: This change doesn't by itself enable PGO in master yet, because training data (optdata packages) for master don't exist on myget yet. However, with these changes, the only step remaining to enable PGO optimizations is to add a project.json referencing the correct optdata package.
Diffstat (limited to 'build.proj')
-rw-r--r--build.proj8
1 files changed, 8 insertions, 0 deletions
diff --git a/build.proj b/build.proj
index 7df2904e36..9992bdc9c6 100644
--- a/build.proj
+++ b/build.proj
@@ -24,6 +24,14 @@
<Delete Files="$(BinDir)System.Private.CoreLib.*" />
</Target>
+ <PropertyGroup>
+ <OptDataProjectJson>$(SourceDir).nuget/optdata/project.json</OptDataProjectJson>
+ <OptDataPackageFeed>https://dotnet.myget.org/F/dotnet-core-optimization-data/api/v3/index.json</OptDataPackageFeed>
+ </PropertyGroup>
+ <Target Name="RestoreOptData">
+ <Exec Condition="Exists('$(OptDataProjectJson)')" Command="$(DnuRestoreCommand) &quot;$(OptDataProjectJson)&quot; --source &quot;$(OptDataPackageFeed)&quot;" />
+ </Target>
+
<Target Name="RestoreNETCorePlatforms" AfterTargets="Build" Condition="'$(RestoreDuringBuild)'=='true'">
<Exec Command="$(DnuRestoreCommand) &quot;$(SourceDir).nuget/init/project.json&quot; --source https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
</Target>