[compiler-rt] r314646 - [cmake] Add a separate CMake var to control profile runtime
Michal Gorny via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 1 22:03:56 PDT 2017
Author: mgorny
Date: Sun Oct 1 22:03:55 2017
New Revision: 314646
URL: http://llvm.org/viewvc/llvm-project?rev=314646&view=rev
Log:
[cmake] Add a separate CMake var to control profile runtime
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.
Differential Revision: https://reviews.llvm.org/D38441
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/CMakeLists.txt
compiler-rt/trunk/test/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=314646&r1=314645&r2=314646&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Sun Oct 1 22:03:55 2017
@@ -38,6 +38,8 @@ option(COMPILER_RT_BUILD_XRAY "Build xra
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)
Modified: compiler-rt/trunk/lib/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/CMakeLists.txt?rev=314646&r1=314645&r2=314646&view=diff
==============================================================================
--- compiler-rt/trunk/lib/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/CMakeLists.txt Sun Oct 1 22:03:55 2017
@@ -41,7 +41,7 @@ if(COMPILER_RT_BUILD_SANITIZERS)
endforeach()
endif()
-if (COMPILER_RT_HAS_PROFILE)
+if(COMPILER_RT_BUILD_PROFILE AND COMPILER_RT_HAS_PROFILE)
compiler_rt_build_runtime(profile)
endif()
Modified: compiler-rt/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/CMakeLists.txt?rev=314646&r1=314645&r2=314646&view=diff
==============================================================================
--- compiler-rt/trunk/test/CMakeLists.txt (original)
+++ compiler-rt/trunk/test/CMakeLists.txt Sun Oct 1 22:03:55 2017
@@ -10,7 +10,7 @@ configure_lit_site_cfg(
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 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
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)
More information about the llvm-commits
mailing list