diff options
author | Andy Gocke <angocke@microsoft.com> | 2021-04-25 04:18:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 04:18:20 +0300 |
commit | 90f97ac50154ee23449f273c3a8d13dfe985815b (patch) | |
tree | 56bd516a95fcedccea98b8ebdcf805dc3ac7c1a7 /src/coreclr/pgosupport.cmake | |
parent | a123d28793ad22954ca6d9074f43b540d0d30b43 (diff) |
Use newest PGO data for Linux and windows-x86 (#51656)
This data was previously held back because we weren't producing
builds with Linux or windows-x86 but now we are. The Linux builds
now produce only a single profdata file, coreclr.profdata, which
should contain all the profile information for all the libraries in the
runtime.
Diffstat (limited to 'src/coreclr/pgosupport.cmake')
-rw-r--r-- | src/coreclr/pgosupport.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/coreclr/pgosupport.cmake b/src/coreclr/pgosupport.cmake index 1e2be5dadb0..c0791c445f0 100644 --- a/src/coreclr/pgosupport.cmake +++ b/src/coreclr/pgosupport.cmake @@ -30,7 +30,7 @@ function(add_pgo TargetName) if(CLR_CMAKE_HOST_WIN32) set(ProfileFileName "${TargetName}.pgd") else(CLR_CMAKE_HOST_WIN32) - set(ProfileFileName "${TargetName}.profdata") + set(ProfileFileName "coreclr.profdata") endif(CLR_CMAKE_HOST_WIN32) file(TO_NATIVE_PATH @@ -41,6 +41,10 @@ function(add_pgo TargetName) # If we don't have profile data availble, gracefully fall back to a non-PGO opt build if(NOT EXISTS ${ProfilePath}) message("PGO data file NOT found: ${ProfilePath}") + elseif(CMAKE_GENERATOR MATCHES "Visual Studio") + # MSVC is sensitive to exactly the options passed during PGO optimization and Ninja and + # MSBuild differ slightly (but not meaningfully for runtime behavior) + message("Cannot use PGO optimization built with Ninja from MSBuild. Re-run build with Ninja to apply PGO information") else(NOT EXISTS ${ProfilePath}) if(CLR_CMAKE_HOST_WIN32) set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /LTCG /USEPROFILE:PGD=\"${ProfilePath}\"") |