diff options
author | Vedant Kumar <vsk@apple.com> | 2016-06-13 23:33:48 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2016-06-13 23:33:48 +0000 |
commit | d1714dc208f77c2e4466aed8d6a1f36fbb07bb76 (patch) | |
tree | 24d997f14fb0dbe4079025fb8b38eb3b8d1f3df3 /CMakeLists.txt | |
parent | ba53b88904876e44f84742485a0f53918db13290 (diff) |
Add support for collating profiles for use with code coverage
Differential Revision: http://reviews.llvm.org/D20993
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ea0b90d991..0f08eb2b2cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -430,6 +430,21 @@ else() set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE) endif() +if (LLVM_BUILD_INSTRUMENTED OR LLVM_BUILD_INSTRUMENTED_COVERAGE) + if(NOT LLVM_PROFILE_MERGE_POOL_SIZE) + # A pool size of 1-2 is probably sufficient on a SSD. 3-4 should be fine + # for spining disks. Anything higher may only help on slower mediums. + set(LLVM_PROFILE_MERGE_POOL_SIZE "4") + endif() + if(NOT LLVM_PROFILE_FILE_PATTERN) + if(NOT LLVM_PROFILE_DATA_DIR) + set(LLVM_PROFILE_FILE_PATTERN "%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw") + else() + file(TO_NATIVE_PATH "${LLVM_PROFILE_DATA_DIR}/%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw" LLVM_PROFILE_FILE_PATTERN) + endif() + endif() +endif() + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run |