Merge commit 'master' into release/2.1
[platform/upstream/coreclr.git] / pgosupport.cmake
index 96ff80a..bc331be 100644 (file)
@@ -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")