Skip to content

Commit

Permalink
Turn off PGO unprofiled warning on Linux (dotnet#17262)
Browse files Browse the repository at this point in the history
This warning will break the build when new files are added to the build that do not have PGO data, meaning that release builds will be broken until a new PGO collection can be run. We should not break the build if there are not counts for new files.
  • Loading branch information
michellemcdaniel committed Mar 27, 2018
1 parent ef88a92 commit bfa1881
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pgosupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function(add_pgo TargetName)
if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELWITHDEBINFO)
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.6)
if(HAVE_LTO)
target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-use=${ProfilePath} -Wno-profile-instr-out-of-date)
target_compile_options(${TargetName} PRIVATE -flto -fprofile-instr-use=${ProfilePath} -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled)
set_property(TARGET ${TargetName} APPEND_STRING PROPERTY LINK_FLAGS " -flto -fuse-ld=gold -fprofile-instr-use=${ProfilePath}")
else(HAVE_LTO)
message(WARNING "LTO is not supported, skipping profile guided optimizations")
Expand Down

0 comments on commit bfa1881

Please sign in to comment.