Add PGO support for Clang/LLVM on Unix (#10533)
authorDaniel Podder <dapodd@microsoft.com>
Thu, 30 Mar 2017 02:01:55 +0000 (19:01 -0700)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2017 02:01:55 +0000 (19:01 -0700)
commit926d104068fffb7e7cf867ab4c92082aab968692
treea41b9d30e6b8fee46739f8e539f8fe5fd6f552cb
parentf990ce64c49d268bcaef5a87d5838f5008ff0a30
Add PGO support for Clang/LLVM on Unix (#10533)

Extend PGO support from VC++ on WIN32 to Clang/LLVM on UNIX as well.
* Just like on Windows: if profile data is missing, skip enabling PGO
  (allows non-PGO builds in branches where we don't publish PGO data).
* PGO with LTO requires additional dependencies (namely a discoverable
  `ld.gold` and `LLVMgold.so`). To protect against broken support and
  keep the build flexible across a wider array of distros, attempt to
  detect whether PGO compilation would work (using cmake's
  `try_compile()`), and fall back to a non-PGO/non-LTO build if the test
  fails.
CMakeLists.txt
configure.cmake [new file with mode: 0644]
pgosupport.cmake