[compiler-rt] Don't build ubsan cxxabi sources when unused
authorFrancis Ricci <francisjricci@gmail.com>
Mon, 22 Aug 2016 20:27:21 +0000 (20:27 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Mon, 22 Aug 2016 20:27:21 +0000 (20:27 +0000)
commit2582a11c4d80e574e1d74c1334551fc61e4f8e0f
treec5472451f8d913b14e5a9b95ea0c6ad92b6bceca
parenta5f8c722c4faf70e40a6317ec3485650e19f9063
[compiler-rt] Don't build ubsan cxxabi sources when unused

Summary:
On apple targets, when SANITIZER_CAN_USE_CXXABI is false,
the ubsan cxxabi sources aren't built, since they're unused.
Do this on non-apple targets as well.

This fixes errors when linking sanitizers if c++ abi is
unavailable.

Reviewers: pcc, kubabrecka, beanz

Subscribers: rnk, llvm-commits, kubabrecka, compnerd, dberris

Differential Revision: https://reviews.llvm.org/D23638

llvm-svn: 279467
compiler-rt/lib/ubsan/CMakeLists.txt