summaryrefslogtreecommitdiff
path: root/pgosupport.cmake
diff options
context:
space:
mode:
authorDaniel Podder <dapodd@microsoft.com>2017-06-01 23:41:50 (GMT)
committerGitHub <noreply@github.com>2017-06-01 23:41:50 (GMT)
commit8f5d775cb4de2b3e765251106991940c09c0859e (patch)
tree333d3845d0529faf20bcecf5511d2b90185e5894 /pgosupport.cmake
parent91329ceefd9efbde1f8486b0a098090e9a10adcb (diff)
downloadcoreclr-8f5d775cb4de2b3e765251106991940c09c0859e.zip
coreclr-8f5d775cb4de2b3e765251106991940c09c0859e.tar.gz
coreclr-8f5d775cb4de2b3e765251106991940c09c0859e.tar.bz2
Fix optdata restore functionality (#11935)
Fix optdata restore functionality (#11935) Bring back optdata restore functionality following the move to 2.0 BuildTools and csproj-based CLI. Disable a harmless warning that broke the Linux build when consuming PGO counts due to -Werr. Fix #11796 for master
Diffstat (limited to 'pgosupport.cmake')
-rw-r--r--pgosupport.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/pgosupport.cmake b/pgosupport.cmake
index dbba415..90bcbc3 100644
--- a/pgosupport.cmake
+++ b/pgosupport.cmake
@@ -20,6 +20,8 @@ function(add_pgo TargetName)
"${CLR_CMAKE_PACKAGES_DIR}/${CLR_CMAKE_OPTDATA_PACKAGEWITHRID}/${CLR_CMAKE_OPTDATA_VERSION}/data/${ProfileFileName}"
ProfilePath
)
+ # NuGet packages are restored to lowercase paths
+ string(TOLOWER "${ProfilePath}" ProfilePath)
if(CLR_CMAKE_PGO_INSTRUMENT)
if(WIN32)
@@ -40,7 +42,7 @@ function(add_pgo TargetName)
else(WIN32)
if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)
if(HAVE_LTO)
- target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-use=${ProfilePath})
+ target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-use=${ProfilePath} -Wno-profile-instr-out-of-date)
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fuse-ld=gold -fprofile-instr-use=${ProfilePath}")
endif(HAVE_LTO)
endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)