diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2015-04-01 22:42:36 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2015-04-01 22:42:36 +0000 |
commit | b05184a2968adf141d964bee0852a849e79f4181 (patch) | |
tree | 9ca6614d778e61c158cc1b9323204f8cc3c7f30a /lib/CMakeLists.txt | |
parent | 06dcedbe140962d536e109a010e25f184a63fa05 (diff) |
[UBSan] Embed UBSan into ASan runtime (compiler-rt part).
Summary:
Change the way we use ASan and UBSan together. Instead of keeping two
separate runtimes (libclang_rt.asan and libclang_rt.ubsan), embed UBSan
into ASan and get rid of libclang_rt.ubsan. If UBSan is not supported on
a platform, all UBSan sources are just compiled into dummy empty object
files. UBSan initialization code (e.g. flag parsing) is directly called
from ASan initialization, so we are able to enforce correct
initialization order.
This mirrors the approach we already use for ASan+LSan. This change
doesn't modify the way we use standalone UBSan.
Test Plan: regression test suite
Reviewers: kubabrecka, zaks.anna, rsmith, kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8646
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@233861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r-- | lib/CMakeLists.txt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 91a7037e3..2b6ae546e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -8,6 +8,7 @@ if(COMPILER_RT_HAS_SANITIZER_COMMON) add_subdirectory(interception) add_subdirectory(sanitizer_common) add_subdirectory(lsan) + add_subdirectory(ubsan) endif() if(COMPILER_RT_HAS_ASAN) @@ -33,7 +34,3 @@ if(COMPILER_RT_HAS_TSAN) add_subdirectory(tsan/dd) endif() -if(COMPILER_RT_HAS_UBSAN) - add_subdirectory(ubsan) -endif() - |