summaryrefslogtreecommitdiff
path: root/lib/ubsan
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-03-22 15:04:31 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-03-22 15:04:31 +0000
commitf8d3fb24f9a40efa40128a74ce919b9a2e88f13f (patch)
treee52ba361365e949d72ad07ebda8507a9fc0ff958 /lib/ubsan
parent351f235ea4d0bfa17b65dd3a0ac14bbd8a98b90b (diff)
[sanitizer] Split coverage into separate RT in sanitizer_common
Summary: `sanitizer_common`'s coverage support is fairly well separated, and libcdep by default. Several sanitizers don't make use of coverage, and as far as I can tell do no benefit from the extra dependencies pulled in by the coverage public interface functions. The following sanitizers call `InitializeCoverage` explicitely: MSan, ASan, LSan, HWAsan, UBSan. On top of this, any sanitizer bundling RTUBSan should add the coverage RT as well: ASan, Scudo, UBSan, CFI (diag), TSan, MSan, HWAsan. So in the end the following have no need: DFSan, ESan, CFI, SafeStack (nolibc anyway), XRay, and the upcoming Scudo minimal runtime. I tested this with all the sanitizers check-* with gcc & clang, and in standalone on Linux & Android, and there was no issue. I couldn't test this on Mac, Fuchsia, BSDs, & Windows for lack of an environment, so adding a bunch of people for additional scrunity. I couldn't test HWAsan either. Reviewers: eugenis, vitalybuka, alekseyshl, flowerhack, kubamracek, dberris, rnk, krytarowski Reviewed By: vitalybuka, alekseyshl, flowerhack, dberris Subscribers: mgorny, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D44701 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@328204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ubsan')
-rw-r--r--lib/ubsan/CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ubsan/CMakeLists.txt b/lib/ubsan/CMakeLists.txt
index 911bd3ebc..04618030e 100644
--- a/lib/ubsan/CMakeLists.txt
+++ b/lib/ubsan/CMakeLists.txt
@@ -76,6 +76,7 @@ if(APPLE)
RTUbsan_standalone
RTSanitizerCommon
RTSanitizerCommonLibc
+ RTSanitizerCommonCoverage
RTInterception
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
PARENT_TARGET ubsan)
@@ -88,6 +89,7 @@ if(APPLE)
RTUbsan_standalone
RTSanitizerCommonNoHooks
RTSanitizerCommonLibcNoHooks
+ RTSanitizerCommonCoverage
RTInterception
LINK_FLAGS ${WEAK_SYMBOL_LINK_FLAGS}
PARENT_TARGET ubsan)
@@ -154,6 +156,7 @@ else()
SOURCES ubsan_init_standalone_preinit.cc
OBJECT_LIBS RTSanitizerCommon
RTSanitizerCommonLibc
+ RTSanitizerCommonCoverage
RTUbsan
RTUbsan_standalone
RTInterception
@@ -173,6 +176,7 @@ else()
ARCHS ${UBSAN_SUPPORTED_ARCH}
OBJECT_LIBS RTSanitizerCommon
RTSanitizerCommonLibc
+ RTSanitizerCommonCoverage
RTUbsan
RTUbsan_cxx
RTUbsan_standalone