summaryrefslogtreecommitdiff
path: root/pgosupport.cmake
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 /pgosupport.cmake
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 'pgosupport.cmake')
-rw-r--r--pgosupport.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/pgosupport.cmake b/pgosupport.cmake
index 015eed6a0f..e4e6bd5091 100644
--- a/pgosupport.cmake
+++ b/pgosupport.cmake
@@ -12,8 +12,9 @@ function(add_pgo TargetName)
set(ProfileFileName "${TargetName}.pgd")
endif(WIN32)
+ set(CLR_CMAKE_OPTDATA_PACKAGEWITHRID "optimization.${CLR_CMAKE_TARGET_OS}-${CLR_CMAKE_TARGET_ARCH}.PGO.CoreCLR")
file(TO_NATIVE_PATH
- "${CLR_CMAKE_PACKAGES_DIR}/Microsoft.DotNet.OptimizationData.Coreclr/${CLR_CMAKE_TARGET_OS}.${CLR_CMAKE_TARGET_ARCH}/${ProfileFileName}"
+ "${CLR_CMAKE_PACKAGES_DIR}/${CLR_CMAKE_OPTDATA_PACKAGEWITHRID}/${CLR_CMAKE_OPTDATA_VERSION}/data/${ProfileFileName}"
ProfilePath
)