From 926d104068fffb7e7cf867ab4c92082aab968692 Mon Sep 17 00:00:00 2001 From: Daniel Podder Date: Wed, 29 Mar 2017 19:01:55 -0700 Subject: 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 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c60fa26424..6327a143f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,9 @@ project(CoreCLR) # Include cmake functions include(functions.cmake) +# Include global configure settings +include(configure.cmake) + if (WIN32) message(STATUS "VS_PLATFORM_TOOLSET is ${CMAKE_VS_PLATFORM_TOOLSET}") message(STATUS "VS_PLATFORM_NAME is ${CMAKE_VS_PLATFORM_NAME}") -- cgit v1.2.3