[PATCH] D38441: [compiler-rt] [cmake] Add a separate CMake var to control profile runtime

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 30 01:09:46 PDT 2017


mgorny created this revision.
Herald added a subscriber: dberris.

Make it possible to control building profile runtime separately from
other options. Before r313549, the profile runtime building was
controlled along with sanitizers. However, since that commit it is built
unconditionally which results in multiple builds for people building
different runtimes separately.


Repository:
  rL LLVM

https://reviews.llvm.org/D38441

Files:
  CMakeLists.txt
  lib/CMakeLists.txt
  test/CMakeLists.txt


Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt
+++ test/CMakeLists.txt
@@ -10,7 +10,7 @@
 
 set(SANITIZER_COMMON_LIT_TEST_DEPS)
 
-if (COMPILER_RT_HAS_PROFILE)
+if(COMPILER_RT_BUILD_PROFILE AND COMPILER_RT_HAS_PROFILE)
   list(APPEND SANITIZER_COMMON_LIT_TEST_DEPS profile)
 endif()
 
@@ -72,7 +72,7 @@
       endif()
     endforeach()
   endif()
-  if (COMPILER_RT_HAS_PROFILE)
+  if(COMPILER_RT_BUILD_PROFILE AND COMPILER_RT_HAS_PROFILE)
     compiler_rt_test_runtime(profile)
   endif()
   if(COMPILER_RT_BUILD_XRAY)
Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -41,7 +41,7 @@
   endforeach()
 endif()
 
-if (COMPILER_RT_HAS_PROFILE)
+if(COMPILER_RT_BUILD_PROFILE AND COMPILER_RT_HAS_PROFILE)
   compiler_rt_build_runtime(profile)
 endif()
 
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -38,6 +38,8 @@
 mark_as_advanced(COMPILER_RT_BUILD_XRAY)
 option(COMPILER_RT_BUILD_LIBFUZZER "Build libFuzzer" ON)
 mark_as_advanced(COMPILER_RT_BUILD_LIBFUZZER)
+option(COMPILER_RT_BUILD_PROFILE "Build profile runtime" ON)
+mark_as_advanced(COMPILER_RT_BUILD_PROFILE)
 option(COMPILER_RT_BUILD_XRAY_NO_PREINIT "Build xray with no preinit patching" OFF)
 mark_as_advanced(COMPILER_RT_BUILD_XRAY_NO_PREINIT)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38441.117255.patch
Type: text/x-patch
Size: 1455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170930/f0e9bdee/attachment.bin>


More information about the cfe-commits mailing list