Add PGO support for Clang/LLVM on Unix (dotnet/coreclr#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)
commitdf3eac55bb16b52b2d513a643a202b9c36a3078d
tree60645c8aa503dc96b627be68e19c3a7d30b5c47c
parent52d9df51520d729b90601857008996d0905b7a69
Add PGO support for Clang/LLVM on Unix (dotnet/coreclr#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.

Commit migrated from https://github.com/dotnet/coreclr/commit/926d104068fffb7e7cf867ab4c92082aab968692
src/coreclr/CMakeLists.txt
src/coreclr/configure.cmake [new file with mode: 0644]
src/coreclr/pgosupport.cmake