summaryrefslogtreecommitdiff
path: root/pgosupport.cmake
AgeCommit message (Collapse)AuthorFilesLines
2020-03-25[Tizen] Enable PGO for Linux/armKonstantin Baladurin1-2/+2
2019-05-06Port all managed product binaries to use SDK style projects (#24285)Aaron Robinson1-2/+4
Convert managed product binary to use SDK project system. - Uses Arcade for versions strings - Overrides Arcade defined output paths - should change in the future
2018-03-27Turn off PGO unprofiled warning on Linux (#17262)Michelle McDaniel1-1/+1
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.
2017-09-14PGI: Load pgort<ver>.dll from the VS native tools env; do not `install` it ↵Daniel Podder1-38/+0
(#12581) On Windows, PGO instrumented builds (build.cmd release <arch> pgoinstrument) introduce a runtime dependency on pgort<ver>.dll for instrumented binaries. This DLL is distributed alongside the C++ compiler, and is made available via the native tools environment that ships with Visual Studio. Previously, we were using cmake to find and "install" this binary alongside the product when doing an instrumented build, so that the resulting bin\Product drop is free of any added external dependencies. However, this approach is fragile, and despite a best effort to make the implementation work across multiple VS releases, it already broke with VS 2017. To fix support for pgoinstrument on VS 2017, and to harden the implementation for future releases of VS, I'm removing the custom cmake install logic for the pgort DLL. Instead, we fall back to the officially supported method: load the correct (native tools) environment before invoking any command that uses an instrumented binary. This happens in one place in the build today--loading the JIT to crossgen System.Private.CoreLib.dll. Note that there's still an existing CLI/Setup bug that requires copying the pgort DLL. We're now doing it from within build.cmd, which is not nearly as fragile for this as cmake is. The workaround is also isolated, so when the referenced issue is fixed, the workaround (as documented) can simply be removed. Fixes #12347.
2017-06-28Add a flag to build.{sh,cmd} to disable PGO.Pat Gavlin1-1/+1
This is helpful when performing JIT throughput measurements.
2017-06-13Skip PGO if clang is too old, and add warnings for skipped PGO (#12248)Daniel Podder1-4/+10
Clang/LLVM cannot merge profile data generated by a newer version of itself. Training currently requires 3.6, but we don't want to completely break the build for 3.5. I'm adding a version check to allow non-PGO release builds on 3.5, along with a warning message. I'm also updating the LTO detection to print a warning message if it causes PGO to be disabled.
2017-06-13Fix Linux PGO optdata consumption + PGO count update (#12239)Daniel Podder1-3/+5
* Update PGO package version to 20170612-1411 * Fix PGO optdata path issue on Linux
2017-06-10Update PGO counts to version 20170609-1125 (#12201)Daniel Podder1-2/+1
2017-06-01Fix optdata restore functionality (#11935)Daniel Podder1-1/+3
Fix optdata restore functionality (#11935) Bring back optdata restore functionality following the move to 2.0 BuildTools and csproj-based CLI. Disable a harmless warning that broke the Linux build when consuming PGO counts due to -Werr. Fix #11796 for master
2017-03-29Add PGO support for Clang/LLVM on Unix (#10533)Daniel Podder1-16/+27
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.
2017-03-07Port Windows PGO support to master (#9985)Daniel Podder1-1/+2
The bulk of this PR is a cherry-pick of commit fa02660 that shipped in release/1.1.0, updating the build system support for PGO to support consuming PGDs properly during release builds on Windows. Also included are the following new changes: * Skip restore of opdata if the requisite project.json is missing * If the optdata package restore fails, fail the build. * Add new build option: 'skiprestoreoptdata' Note: This change doesn't by itself enable PGO in master yet, because training data (optdata packages) for master don't exist on myget yet. However, with these changes, the only step remaining to enable PGO optimizations is to add a project.json referencing the correct optdata package.
2016-10-04Add PGO GENPROFILE support to coreclr and clrjit (#7423)Daniel Podder1-0/+68
* Add PGO GENPROFILE support to coreclr and clrjit Update the cmake build system to enable support for Profile Guided Optimization (PGO) on Windows, and enable this feature for two target binaries (coreclr and clrjit). With this change, toggle between instrumented and profile-optimized settings for target binaries by passing pgoinstrument argument to the build.cmd Assume profile-optimized mode by default. Fall back to regular non-PGO optimized builds if profile data is not available.