1 commit 4a10504e1f70c70c049fc439c4fce37a12de5941
2 Author: Vedant Kumar <vsk@apple.com>
3 Date: Mon Sep 18 18:13:47 2017 +0000
5 [cmake] Make it possible to build and test profile without sanitizers
7 This should fix an issue which arises when running check-compiler-rt on
9 http://green.lab.llvm.org/green/job/clang-stage2-coverage-R_build/1590/
11 The bot doesn't build the sanitizers, but the check-compiler-rt target
12 always expects the profile runtime to exist.
16 diff --git a/compiler-rt/lib/CMakeLists.txt b/compiler-rt/lib/CMakeLists.txt
17 index 025320f473f5..a92d0a3f082d 100644
18 --- a/compiler-rt/lib/CMakeLists.txt
19 +++ b/compiler-rt/lib/CMakeLists.txt
20 @@ -39,7 +39,9 @@ if(COMPILER_RT_BUILD_SANITIZERS)
21 foreach(sanitizer ${COMPILER_RT_SANITIZERS_TO_BUILD})
22 compiler_rt_build_runtime(${sanitizer})
26 +if (COMPILER_RT_HAS_PROFILE)
27 compiler_rt_build_runtime(profile)
30 diff --git a/compiler-rt/test/CMakeLists.txt b/compiler-rt/test/CMakeLists.txt
31 index 6bc7cdbecf6a..e691eab7d4a7 100644
32 --- a/compiler-rt/test/CMakeLists.txt
33 +++ b/compiler-rt/test/CMakeLists.txt
34 @@ -71,7 +71,8 @@ if(COMPILER_RT_CAN_EXECUTE_TESTS)
35 compiler_rt_test_runtime(${sanitizer})
40 + if (COMPILER_RT_HAS_PROFILE)
41 compiler_rt_test_runtime(profile)
43 if(COMPILER_RT_BUILD_XRAY)