diff options
author | Kostya Kortchinsky <kostyak@google.com> | 2018-03-22 15:04:31 +0000 |
---|---|---|
committer | Kostya Kortchinsky <kostyak@google.com> | 2018-03-22 15:04:31 +0000 |
commit | 988fab3f66efb04310b703d7028267dbf59adf01 (patch) | |
tree | 09ff98406698aa9d2d2a3821d16696a60a01a76a /compiler-rt/lib/hwasan | |
parent | 53b2c3329a1cd8d8806afb3ec74648641e606f7b (diff) | |
download | bcm5719-llvm-988fab3f66efb04310b703d7028267dbf59adf01.tar.gz bcm5719-llvm-988fab3f66efb04310b703d7028267dbf59adf01.zip |
[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
llvm-svn: 328204
Diffstat (limited to 'compiler-rt/lib/hwasan')
-rw-r--r-- | compiler-rt/lib/hwasan/CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/lib/hwasan/CMakeLists.txt b/compiler-rt/lib/hwasan/CMakeLists.txt index 15013c09cdf..34f5f15b9f2 100644 --- a/compiler-rt/lib/hwasan/CMakeLists.txt +++ b/compiler-rt/lib/hwasan/CMakeLists.txt @@ -78,7 +78,8 @@ foreach(arch ${HWASAN_SUPPORTED_ARCH}) RTInterception RTSanitizerCommon RTSanitizerCommonLibc - RTUbsan + RTSanitizerCommonCoverage + RTUbsan CFLAGS ${HWASAN_RTL_CFLAGS} PARENT_TARGET hwasan) add_compiler_rt_runtime(clang_rt.hwasan_cxx @@ -112,7 +113,8 @@ foreach(arch ${HWASAN_SUPPORTED_ARCH}) RTInterception RTSanitizerCommon RTSanitizerCommonLibc - RTUbsan + RTSanitizerCommonCoverage + RTUbsan # The only purpose of RTHWAsan_dynamic_version_script_dummy is to # carry a dependency of the shared runtime on the version script. # Replacing it with a straightforward |