[CMake] Use ExternalProject to build MSan-ified version of libcxx for unit tests.
commit2e8e44123a1af21beacf1190fc9f9c8104088c5f
authorAlexey Samsonov <samsonov@google.com>
Fri, 9 May 2014 22:11:03 +0000 (9 22:11 +0000)
committerAlexey Samsonov <samsonov@google.com>
Fri, 9 May 2014 22:11:03 +0000 (9 22:11 +0000)
treef695eb3804dbd01b18db183bb7ffe705e86065ac
parent37ad976ebf0b192db2c7d5f23c404d4e0dede625
[CMake] Use ExternalProject to build MSan-ified version of libcxx for unit tests.

This change lets MSan rely on libcxx's own build system instead of manually
compiling its sources and setting up all the necessary compile flags. It would
also simplify compiling libcxx with another sanitizers (in particular, TSan).

The tricky part is to make sure libcxx is reconfigured/rebuilt when Clang or
MSan runtime library is changed. "clobber" step used in this patch works well
for me, but it's possible it would break for other configurations - will
watch the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208451 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/Modules/AddCompilerRT.cmake
lib/msan/CMakeLists.txt
lib/msan/tests/CMakeLists.txt