From 1a1fdb8fb0839832b64248582082c90e166b74b5 Mon Sep 17 00:00:00 2001 From: Daniel Podder Date: Tue, 7 Mar 2017 21:14:57 -0600 Subject: 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. --- pgosupport.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pgosupport.cmake') 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 ) -- cgit v1.2.3